Repository navigation
test(otel): cover removal of deprecated and doubled collector attributes - #776
Merged
lorespiz merged 1 commit intoOct 21, 2026
Merged
Conversation
This was referenced Oct 5, 2026
This was referenced Oct 7, 2026
miconeilaws
reviewed
Oct 13, 2026
miconeilaws
left a comment
Collaborator
There was a problem hiding this comment.
- Squash commits
- I don't think these tests cover the integration pipelines like karpenter etc, do we also need these checks there?
- Other pipelines have no coverage. dcgm, neuron, ebs-csi and lis-csi also gained the semconv drop in #384, and dcgm also gained the resource-copy delete. Their suites exist (gpu, neuron, ebs_csi, lis_csi), so with a shared helper, one call per suite closes the gap.
petruanica
force-pushed
the
otel-ci-l1-drop-redundant-attributes
branch
2 times, most recently
from
October 14, 2026 11:16
be67124 to
567bcad
Compare
lorespiz
approved these changes
Oct 19, 2026
petruanica
force-pushed
the
otel-ci-l1-drop-redundant-attributes
branch
from
October 21, 2026 09:46
567bcad to
bb9627d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the issue
The Container Insights pipelines are dropping two groups of attributes that duplicate values already being sent: the deprecated semantic conventions
net.host.name,net.host.portandhttp.scheme, and the resource-scope copies of the raw Prometheus labels. Neither had integration coverage.The deprecated-semconv half has a specific failure worth guarding. The karpenter, keda, kserve-controlplane and knative-controlplane promote transforms delete
url.scheme— the current name — while keepinghttp.scheme, the deprecated one, and no test detects it.Description of changes
Adds a shared pair of checks in
util/otelmetrics, then calls them from every suite whose pipeline is affected. Following the existing style of that package, the checks return an error rather than taking a*testing.T, so each suite wraps them in its ownrequire.NoError.CheckDeprecatedSemconvRemovedfails if any series carries one of the three deprecated attributes at resource scope.CheckCurrentSemconvPresentfails if no series carriesurl.scheme. The second is the valuable half: it fails if the inversion described above ever returns.CheckRawLabelsNotAtResourceScopefails if a raw Prometheus label appears at resource scope as well as datapoint scope.Coverage per suite:
url.schemepresentstandard(node-exporter, cadvisor, apiserver, kube-state-metrics)solutions/karpentersolutions/kedagpu(dcgm)neuronebs_csilis_csiTwo of those columns need explaining.
url.schemeis asserted present only where a missing value could not be explained by something other than a bug. The attribute-limit processor drops attributes by tier abovemax_total_attributes, andurl.schemeis not on its protected list, so on a GPU, Trainium or heavily-labelled node a missingurl.schemewould be ambiguous. The karpenter and keda metrics are cluster-scoped with small attribute sets, and they are also the pipelines that carried the inversion, so that is where the assertion earns its place.The raw-label check is marked
n/awhere the pipeline runs nogroupbyattrs, so no raw name reaches resource scope to begin with. neuron is the one exception: it runsgroupbyattrs, but over the semantic-convention names plusruntime_tag, whichneuron_promoterenames and then deletes.The datapoint copies, which are what dashboards read, must survive. Those are already covered by
TestCadvisorHasRawPromotedKeys,TestDCGMHasRawPromotedKeysand theTestKSM_*_HasRaw*Labelfamily, so the new tests check only the resource side.License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
The three shared checks have unit tests in
util/otelmetrics/attribute_scope_test.go, which run without a cluster: 12 subtests, all passing. They cover each key individually, a clean series, a single offending series among several, empty results, and the de-duplication of repeated failure messages.gofmtclean andgo vet -tags integrationpasses on all eight affected packages; every integration test binary compiles with the new tests registered.The integration tests themselves need a live cluster running the paired configuration change. They will fail against a cluster that has not yet taken it — that is the intended behaviour, and the reason this PR is paired one-to-one with the config change.
Coverage for the
vllmandkserve_controlplanepipelines is not in this PR. There is no suite for either yet, and the cluster used for validation runs neither solution, so a test added now would pass vacuously. The chart-side change for both is asserted on the rendered configuration in aws-observability/helm-charts#384.Related pull requests
PR Checklist
gofmtclean,go vet -tags integrationpasses, test binary builds