-
Notifications
You must be signed in to change notification settings - Fork 340
Wire per-component cardinality limits from Config #11732
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
base: dougqh/control-tag-cardinality
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3863,6 +3863,17 @@ public int getTraceStatsInterval() { | |
| return traceStatsInterval; | ||
| } | ||
|
|
||
| /** | ||
| * Returns the per-cycle cardinality limit for the named stats field, following the RFC naming | ||
| * pattern {@code DD_TRACE_STATS_{tagName}_CARDINALITY_LIMIT} (e.g. {@code | ||
| * DD_TRACE_STATS_RESOURCE_CARDINALITY_LIMIT}). The caller supplies the default from {@code | ||
| * MetricCardinalityLimits} so per-field rationale stays co-located with the defaults. | ||
| */ | ||
| public int getTraceStatsCardinalityLimit(String tagName, int defaultLimit) { | ||
| return configProvider.getInteger( | ||
| "trace.stats." + tagName + ".cardinality.limit", defaultLimit); | ||
|
Comment on lines
+3873
to
+3874
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When any of the new Useful? React with 👍 / 👎. |
||
| } | ||
|
|
||
| public boolean isLogsInjectionEnabled() { | ||
| return logsInjectionEnabled; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10641,6 +10641,86 @@ | |
| "aliases": [] | ||
| } | ||
| ], | ||
| "DD_TRACE_STATS_RESOURCE_CARDINALITY_LIMIT": [ | ||
| { | ||
| "version": "A", | ||
| "type": "integer", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The supported-configurations metadata uses Useful? React with 👍 / 👎.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup, |
||
| "default": "1024", | ||
| "aliases": [] | ||
| } | ||
| ], | ||
| "DD_TRACE_STATS_SERVICE_CARDINALITY_LIMIT": [ | ||
| { | ||
| "version": "A", | ||
| "type": "integer", | ||
| "default": "32", | ||
| "aliases": [] | ||
| } | ||
| ], | ||
| "DD_TRACE_STATS_OPERATION_CARDINALITY_LIMIT": [ | ||
| { | ||
| "version": "A", | ||
| "type": "integer", | ||
| "default": "64", | ||
| "aliases": [] | ||
| } | ||
| ], | ||
| "DD_TRACE_STATS_SERVICE_SOURCE_CARDINALITY_LIMIT": [ | ||
| { | ||
| "version": "A", | ||
| "type": "integer", | ||
| "default": "16", | ||
| "aliases": [] | ||
| } | ||
| ], | ||
| "DD_TRACE_STATS_TYPE_CARDINALITY_LIMIT": [ | ||
| { | ||
| "version": "A", | ||
| "type": "integer", | ||
| "default": "16", | ||
| "aliases": [] | ||
| } | ||
| ], | ||
| "DD_TRACE_STATS_SPAN_KIND_CARDINALITY_LIMIT": [ | ||
| { | ||
| "version": "A", | ||
| "type": "integer", | ||
| "default": "8", | ||
| "aliases": [] | ||
| } | ||
| ], | ||
| "DD_TRACE_STATS_HTTP_METHOD_CARDINALITY_LIMIT": [ | ||
| { | ||
| "version": "A", | ||
| "type": "integer", | ||
| "default": "16", | ||
| "aliases": [] | ||
| } | ||
| ], | ||
| "DD_TRACE_STATS_HTTP_ENDPOINT_CARDINALITY_LIMIT": [ | ||
| { | ||
| "version": "A", | ||
| "type": "integer", | ||
| "default": "64", | ||
| "aliases": [] | ||
| } | ||
| ], | ||
| "DD_TRACE_STATS_GRPC_STATUS_CODE_CARDINALITY_LIMIT": [ | ||
| { | ||
| "version": "A", | ||
| "type": "integer", | ||
| "default": "24", | ||
| "aliases": [] | ||
| } | ||
| ], | ||
| "DD_TRACE_STATS_PEER_TAG_CARDINALITY_LIMIT": [ | ||
| { | ||
| "version": "A", | ||
| "type": "integer", | ||
| "default": "512", | ||
| "aliases": [] | ||
| } | ||
| ], | ||
| "DD_TRACE_STATUS404DECORATOR_ENABLED": [ | ||
| { | ||
| "version": "A", | ||
|
|
||
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.
QQ: just curious if this
MetricCardinalityLimitscan be anenumand no need to pass string andintconst. Justenumand get the rest from it where needed.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.
Yeah, we might be able to do that. The only complication is that we might have to move the enum next to Config.