You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
otel lint: high-cardinality GenAI attributes used as metric attributes #3042
area:lintLint rules, post-synth checks, policyarea:otelOpenTelemetry, collector, and observability lexiconsenhancementNew feature or requestfollowup:lexicon-maturityFollow-up to epic #2960 (otel, prometheus, grafana maturity); candidate for the next epic
Several GenAI attributes take a new value on every request or conversation. Used as a metric attribute, each one gives a new time series per request. That is how a GenAI metrics pipeline blows up a Prometheus server. The collector accepts such a config without a warning.
The attributes: gen_ai.conversation.id, gen_ai.response.id, gen_ai.tool.call.id, gen_ai.request.previous_response.id, gen_ai.memory.record.id, and the general session.id, user.id, enduser.id. Content keys (gen_ai.input.messages and the others in GENAI_CONTENT_ATTRIBUTES) are worse still: they are unbounded, and sensitive too.
Scope
A post-synth check (next free OTEL1xx number) that reports any of these keys used as a metric attribute:
The list lives beside GENAI_ATTRIBUTES in src/genai.ts, so #3044's additions extend it. A caller who has bounded one of these keys some other way can suppress the check for it, through whatever suppression post-synth checks already support.
Acceptance
The check reports each listed key in each of the component fields above, with failing and passing fixtures.
Source of the key list: GENAI_SEMCONV_PIN (semantic-conventions v1.41.1) defines gen_ai.conversation.id, gen_ai.response.id, gen_ai.tool.call.id (model/gen-ai/registry.yaml), session.id, user.id and enduser.id. gen_ai.request.previous_response.id and gen_ai.memory.record.id are not at the pin; they are on semantic-conventions-genai main (checked at b31e9e8). They stay in the list because instrumentation sets them already, and the docs table says which source each key comes from.
The check runs inside validateCollectorConfig, so WK8604 reports it for ConfigMap configs under OTEL116.
An empty or unset signaltometricsinclude_resource_attributes keeps all resource attributes. What those are depends on the SDK, so it is not reported. Only keys that are listed get reported.
servicegraphdimensions is checked as well, because it is the same kind of field.
Severity is warning, and the audit entry is merge-worthy with category efficiency. Suppression is lint.rules: { OTEL116: "off" }, because post-synth checks take no per-key options.
area:lintLint rules, post-synth checks, policyarea:otelOpenTelemetry, collector, and observability lexiconsenhancementNew feature or requestfollowup:lexicon-maturityFollow-up to epic #2960 (otel, prometheus, grafana maturity); candidate for the next epic
Activity
lex00 commentedon Oct 1, 2026
Design notes for #3070 (OTEL116):
GENAI_SEMCONV_PIN(semantic-conventions v1.41.1) definesgen_ai.conversation.id,gen_ai.response.id,gen_ai.tool.call.id(model/gen-ai/registry.yaml),session.id,user.idandenduser.id.gen_ai.request.previous_response.idandgen_ai.memory.record.idare not at the pin; they are on semantic-conventions-genai main (checked at b31e9e8). They stay in the list because instrumentation sets them already, and the docs table says which source each key comes from.validateCollectorConfig, so WK8604 reports it for ConfigMap configs under OTEL116.signaltometricsinclude_resource_attributeskeeps all resource attributes. What those are depends on the SDK, so it is not reported. Only keys that are listed get reported.servicegraphdimensionsis checked as well, because it is the same kind of field.lint.rules: { OTEL116: "off" }, because post-synth checks take no per-key options.genai.test.tsruns everygenAiPipeline()option set throughvalidateCollectorConfig, so otel: emit gen_ai.client.operation.duration and gen_ai.client.token.usage from spans, opt-in #3041's option set will be checked once it is added there.