-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable optional trust domain label for all metrics #5673
base: main
Are you sure you want to change the base?
Conversation
7d27be8
to
0ce122b
Compare
e2302d1
to
5938f07
Compare
pkg/common/telemetry/metrics.go
Outdated
if c.FileConfig.EnableTrustDomainLabel != nil { | ||
impl.enableTrustDomainLabel = *c.FileConfig.EnableTrustDomainLabel | ||
} else { | ||
impl.enableTrustDomainLabel = false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since default is false you can just avoid else, or set
impl.enableTrustDomainLabel = false
if c.FileConfig.EnableTrustDomainLabel != nil {
impl.enableTrustDomainLabel = *c.FileConfig.EnableTrustDomainLabel
}
pkg/common/telemetry/metrics.go
Outdated
for _, s := range m.metricsSinks { | ||
s.AddSample(key, val) | ||
if m.enableTrustDomainLabel { | ||
m.AddSampleWithLabels(key, val, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if we always call m.AddSampleWithLabels(key, val, nil)
? even may that reduce the uses of all repeted ifs?
Bumps the aws-sdk group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [github.com/aws/aws-sdk-go-v2/service/ec2](https://github.com/aws/aws-sdk-go-v2) | `1.187.0` | `1.194.0` | | [github.com/aws/aws-sdk-go-v2/service/iam](https://github.com/aws/aws-sdk-go-v2) | `1.37.0` | `1.38.1` | | [github.com/aws/aws-sdk-go-v2/service/organizations](https://github.com/aws/aws-sdk-go-v2) | `1.34.0` | `1.35.1` | | [github.com/aws/aws-sdk-go-v2/service/s3](https://github.com/aws/aws-sdk-go-v2) | `1.66.2` | `1.69.0` | | [github.com/aws/aws-sdk-go-v2/service/sts](https://github.com/aws/aws-sdk-go-v2) | `1.32.3` | `1.33.1` | Updates `github.com/aws/aws-sdk-go-v2/service/ec2` from 1.187.0 to 1.194.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](aws/aws-sdk-go-v2@service/ec2/v1.187.0...service/ec2/v1.194.0) Updates `github.com/aws/aws-sdk-go-v2/service/iam` from 1.37.0 to 1.38.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/service/s3/v1.38.1/CHANGELOG.md) - [Commits](aws/aws-sdk-go-v2@service/s3/v1.37.0...service/s3/v1.38.1) Updates `github.com/aws/aws-sdk-go-v2/service/organizations` from 1.34.0 to 1.35.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](aws/aws-sdk-go-v2@service/s3/v1.34.0...service/fms/v1.35.1) Updates `github.com/aws/aws-sdk-go-v2/service/s3` from 1.66.2 to 1.69.0 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Commits](aws/aws-sdk-go-v2@service/s3/v1.66.2...service/s3/v1.69.0) Updates `github.com/aws/aws-sdk-go-v2/service/sts` from 1.32.3 to 1.33.1 - [Release notes](https://github.com/aws/aws-sdk-go-v2/releases) - [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/service/s3/v1.33.1/CHANGELOG.md) - [Commits](aws/aws-sdk-go-v2@v1.32.3...service/s3/v1.33.1) --- updated-dependencies: - dependency-name: github.com/aws/aws-sdk-go-v2/service/ec2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk - dependency-name: github.com/aws/aws-sdk-go-v2/service/iam dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk - dependency-name: github.com/aws/aws-sdk-go-v2/service/organizations dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk - dependency-name: github.com/aws/aws-sdk-go-v2/service/s3 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk - dependency-name: github.com/aws/aws-sdk-go-v2/service/sts dependency-type: direct:production update-type: version-update:semver-minor dependency-group: aws-sdk ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: gajibade <[email protected]>
Bumps [msys2/setup-msys2](https://github.com/msys2/setup-msys2) from 2.24.1 to 2.25.0. - [Release notes](https://github.com/msys2/setup-msys2/releases) - [Changelog](https://github.com/msys2/setup-msys2/blob/main/CHANGELOG.md) - [Commits](msys2/setup-msys2@ddf331a...c52d1fa) --- updated-dependencies: - dependency-name: msys2/setup-msys2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: gajibade <[email protected]>
Bumps [actions/dependency-review-action](https://github.com/actions/dependency-review-action) from 4.4.0 to 4.5.0. - [Release notes](https://github.com/actions/dependency-review-action/releases) - [Commits](actions/dependency-review-action@4081bf9...3b139cf) --- updated-dependencies: - dependency-name: actions/dependency-review-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: gajibade <[email protected]>
* Bump google.golang.org/api from 0.204.0 to 0.209.0 Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.204.0 to 0.209.0. - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](googleapis/google-api-go-client@v0.204.0...v0.209.0) --- updated-dependencies: - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Update protoc-gen-go version Signed-off-by: Agustín Martínez Fayó <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Agustín Martínez Fayó <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Agustín Martínez Fayó <[email protected]> Signed-off-by: gajibade <[email protected]>
* Allow configuration of mandatory PQ KEM: implementation * Allow configuration of mandatory PQ KEM: docs * Allow configuration of mandatory PQ KEM: tests --------- Signed-off-by: Hugo Landau <[email protected]> Signed-off-by: Marcos Yacob <[email protected]> Co-authored-by: Marcos Yacob <[email protected]> Signed-off-by: gajibade <[email protected]>
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.9.0 to 1.10.0. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](stretchr/testify@v1.9.0...v1.10.0) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: gajibade <[email protected]>
Bumps [github.com/lestrrat-go/jwx/v2](https://github.com/lestrrat-go/jwx) from 2.1.2 to 2.1.3. - [Release notes](https://github.com/lestrrat-go/jwx/releases) - [Changelog](https://github.com/lestrrat-go/jwx/blob/v2.1.3/Changes) - [Commits](lestrrat-go/jwx@v2.1.2...v2.1.3) --- updated-dependencies: - dependency-name: github.com/lestrrat-go/jwx/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: gajibade <[email protected]>
Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.19.1 to 0.19.2. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](kubernetes-sigs/controller-runtime@v0.19.1...v0.19.2) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-runtime dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: gajibade <[email protected]>
* Adding support for configurable jwt issuer + test cases Signed-off-by: Luthra, Ayush <[email protected]> * Moving verifyhost check + adding more test cases Signed-off-by: Luthra, Ayush <[email protected]> * Adding test case of jwt issuer with just a host Signed-off-by: Luthra, Ayush <[email protected]> * Updating readme docs + fixing spacing Signed-off-by: Luthra, Ayush <[email protected]> * Fixing spacing in readme table Signed-off-by: Luthra, Ayush <[email protected]> * fixing windows test cases + minor refactor Signed-off-by: Luthra, Ayush <[email protected]> --------- Signed-off-by: Luthra, Ayush <[email protected]> Signed-off-by: gajibade <[email protected]>
Signed-off-by: gajibade <[email protected]>
Signed-off-by: gajibade <[email protected]>
Signed-off-by: gajibade <[email protected]>
Signed-off-by: gajibade <[email protected]>
fe3f092
to
b06fee1
Compare
Just mentioning here that this addresses issue #5652. |
Signed-off-by: Grace Ajibade <[email protected]>
This PR is based on this comment and the desire for a different tag name than
service
which is what go-metrics would use as a label ifServiceName
andEnableServiceLabel
were used.The
trust_domain
label was used to separate it from thetrust_domain_id
label that is already added for some metrics.Since this label is enabled for all metrics, the best place to add it looks to be in each of the metric function in metric.go.
Fixes #5652