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
Add option to restore high cardinality for metrics for HTTP server #7429
Add option to restore high cardinality for metrics for HTTP server #7429
Conversation
This is configured using the Configuration CRD. High cardinality is enabled by default in Dapr 1.13, but shows a warning. The default behavior will be changed in 1.14. Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #7429 +/- ##
==========================================
- Coverage 62.19% 62.11% -0.08%
==========================================
Files 244 245 +1
Lines 22297 22346 +49
==========================================
+ Hits 13867 13880 +13
- Misses 7281 7306 +25
- Partials 1149 1160 +11 ☔ View full report in Codecov by Sentry. |
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Before merging this issue, please create a docs PR to update the following |
…cs-cardinality
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
charts/dapr/crds/configuration.yaml
Outdated
the HTTP server | ||
properties: | ||
increasedCardinality: | ||
description: 'If false, metrics for the HTTP server are collected |
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.
nitpick
If true,
charts/dapr/crds/configuration.yaml
Outdated
the HTTP server | ||
properties: | ||
increasedCardinality: | ||
description: 'If false, metrics for the HTTP server are collected |
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.
same nitpick
/ok-to-test |
/test-version-skew |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
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.
Some comments from me :)
type MetricHTTP struct { | ||
// If false, metrics for the HTTP server are collected with increased cardinality. | ||
// The default is true in Dapr 1.13, but will be changed to false in 1.14+ | ||
// TODO @ItalyPaleAle: Metrics cardinality |
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.
Intended to be committed?
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.
Yes. This is so I can search "TODO @ItalyPaleAle" in the codebase :)
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.
I changed the text to be more explicit
type base struct { | ||
daprd *procdaprd.Daprd | ||
httpClient *http.Client | ||
grpcClient runtimev1pb.DaprClient | ||
grpcConn *grpc.ClientConn | ||
place *placement.Placement |
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.
I am not a fan of having a "base" suite test case as it obfuscates what is being setup/run to the reader. We should be over explicit in tests.
Can we move the base code into its consumed test cases?
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.
We can but then the code would be replicated multiple times and be harder to maintain
@@ -0,0 +1,97 @@ | |||
/* |
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.
Consider moving both http tests into a http
directory. This improves test organisation.
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.
Can't if using the base class, which is for DRY
spec: | ||
metrics: | ||
http: | ||
increasedCardinality: 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.
Please also have a test for when this value is 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.
Added test to pkg/config/configuration_test.go
since the value will change in the future and the test is duplicate.
tests/integration/suite/daprd/metrics/httpserver_lowcardinality.go
Outdated
Show resolved
Hide resolved
…cs-cardinality
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
…cs-cardinality Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
/test-version-skew |
/ok-to-test |
Dapr Version Skew integration test (dapr-sidecar-master - 1.12.4)Commit ref: 25cfa96 ✅ Version Skew tests passed |
…cs-cardinality
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
…cs-cardinality Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
I am OK to merge this PR but need the MacOS integration tests to pass. |
This PR is adding flakiness to integration tests or a bug: https://github.com/dapr/dapr/actions/runs/7716239633?pr=7429 |
Those are the same errors we have in master |
Will fix flakiness in master and re-assess this PR. We need to fix both issues to release anyway. |
Yaron and I decided not to block this PR due to the additional test scenarios requested.
This is configured using the Configuration CRD. High cardinality is enabled by default in Dapr 1.13, but shows a warning. The default behavior will be changed in 1.14.
Fixes #7295