Repository navigation
Drop deprecated and duplicated attributes from Container Insights - #384
Merged
Merged
Conversation
This was referenced Oct 7, 2026
miconeilaws
reviewed
Oct 8, 2026
miconeilaws
reviewed
Oct 13, 2026
miconeilaws
left a comment
Collaborator
There was a problem hiding this comment.
Requested changes
Two comments are now wrong:
_otel-container-insights-config.tpl:622 (dcgm) says "Raw labels are still at resource scope (not deleted), so copy them back down."
_otel-container-insights-cluster-scraper-config.tpl:440 (KSM) says "Raw labels stay at resource scope and are copied back to datapoint scope."
Both should say the resource copies are deleted after the copy-back.
Squash the history. It is now feat → feat(drop id) → revert. The checklist claims a squashed, logical set of commits, so squash to one commit with the cAdvisor id paragraph removed from the message.
Update aws/amazon-cloudwatch-agent-test#776. Its title still says "cAdvisor cgroup-path attributes". Remove any id assertion there, or it will fail against this chart.
petruanica
force-pushed
the
otel-ci-drop-deprecated-and-doubled-attributes
branch
2 times, most recently
from
October 14, 2026 11:05
c11348b to
9b9592f
Compare
petruanica
force-pushed
the
otel-ci-drop-deprecated-and-doubled-attributes
branch
from
October 14, 2026 11:37
9b9592f to
c07de40
Compare
9 tasks done
lorespiz
reviewed
Oct 19, 2026
|
|
||
| # Drop receiver-injected deprecated semconv attributes; their current-spelling | ||
| # twins (server.address, server.port, url.scheme) carry the same values and stay. | ||
| transform/cw_k8s_ci_v0_drop_deprecated_semconv: |
Contributor
There was a problem hiding this comment.
Since this ships with the chart bump to agent 1.300074, whose receiver is v0.150 and no longer emits net.host.*/http.scheme, drop_deprecated_semconv only takes effect when a customer overrides agent.image.tag to 1.300073 or earlier. Is it worth keeping as a guard for that case, or should we drop it to keep the pipelines simpler?
Collaborator
Author
There was a problem hiding this comment.
Let's keep it for now, we can always drop it in the future
lorespiz
approved these changes
Oct 19, 2026
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.
Note
Customer-visible, but not breaking in the way #383 is. Every attribute removed here has an identically-valued replacement already on the same series, so the consumer-side fix is a rename rather than a lost dimension.
Issue #, if available:
n/a
Description of changes:
Removes two groups of attributes that duplicate values the Container Insights pipelines already send.
Deprecated semantic conventions. The Prometheus receiver injects
net.host.name,net.host.portandhttp.schemeon every scrape target alongside their current-spelling twinsserver.address,server.portandurl.scheme. Each pair carries an identical value on the same series. A newtransform/cw_k8s_ci_v0_drop_deprecated_semconvdeletes the deprecated form and keeps the current one, wired into all fourteen Prometheus-receiver pipelines across both configs.efais not in that set because it usesawsefareceiver, andkubeletstatsis not because it useskubeletstatsreceiver— neither receiver injects these attributes.This also corrects an inversion: the karpenter, keda, kserve-controlplane and knative-controlplane promote transforms deleted
url.scheme, the current name, while keeping the deprecatedhttp.scheme. Those inline deletes are replaced by the shared processor, so all fourteen pipelines agree. Promote transforms are copied when a solution is added, so keeping the deletes in one processor referenced from each pipeline list means a new solution cannot reintroduce the inversion.Doubled raw Prometheus labels.
groupbyattrsmoves each raw label to resource scope; the promote transforms then rename it to its semantic-convention name and copy the raw name back down to the datapoint, but never remove the resource-level copy. This deletes that copy in the seven pipelines that leave it behind: cadvisor, kube-state-metrics, dcgm, karpenter, keda, kserve-controlplane and knative-controlplane. The remaining Prometheus pipelines need no change. node-exporter, apiserver, vllm, knative-dataplane, ebs-csi and lis-csi run nogroupbyattrs, so no raw name reaches resource scope at all; neuron runs one, but it lifts the semantic-convention names plusruntime_tag, whichneuron_promoterenames and then deletes.The datapoint copies are kept for dashboard compatibility and the semantic-convention names are untouched, so no consumer loses a dimension. Nothing downstream reads the raw resource copies:
k8sattributeskeys itspod_associationonk8s.pod.name/k8s.namespace.name/k8s.node.name,transform/cw_k8s_ci_v0_set_workloadreads thek8s.*.nameforms, andawsattributelimitkeys on thek8s.node.label.*andk8s.pod.label.*prefixes. The new deletes sit in a trailingcontext: resourceblock so they run after the datapoint copy-back, since transform statement groups execute in declaration order.Customer-visible changes
net.host.name,net.host.portandhttp.schemedisappear from every metric a Prometheus-receiver pipeline emits, so a query or alarm selecting on one stops matching. The replacement is a rename, not a removal:server.address,server.portandurl.schemecarry identical values on the same series and are untouched, so the consumer fix is a one-line edit.The raw-label deletions are narrower: the raw names (
pod,namespace,containerand the kube-state-metrics set) stay at datapoint scope, which is where dashboards read them. Only the duplicate resource-scope copy goes, so@resource.pod-style selectors stop resolving — that prefix is how PromQL addresses resource attributes — while the plain datapoint label keeps working.Both are worth a release note; neither removes information that is not carried elsewhere in the payload.
Testing:
Tested with
helm templateacross the chart's flag matrix with all solutions enabled, plus every suite incharts/amazon-cloudwatch-observability/tests:flag_matrix.sh(8 cases),pod_level_values.sh(22 checks),yaml_document_injection.sh(17 checks),kserve_pipeline_shape.sh(21 checks),vllm_pipeline_shape.sh(25 checks),knative_pipeline_shape.sh(22 checks) andneuron_pipeline_shape.sh(15 checks). All pass.The rendered output of both agents was decoded and asserted directly: every pipeline with a
prometheus/receiver liststransform/cw_k8s_ci_v0_drop_deprecated_semconv, no processor anywhere deletesurl.scheme, and each of the seven copy-back promote transforms emits its statement groups inresourcethendatapointthenresourceorder with the deletes in the trailing block.New integration coverage in aws/amazon-cloudwatch-agent-test#776.
TestDeprecatedSemconvAttributesRemovedasserts the three deprecated attributes are gone whileurl.schemeis still present on at least one series — the assertion that would have caught the inversion — andTestRawLabelsOnlyAtDatapointScopeasserts the raw Prometheus labels exist only at datapoint scope. That PR also extends the same two checks into the gpu, neuron, ebs-csi, lis-csi, karpenter and keda suites through a shared helper, so each pipeline this PR touches is asserted in its own suite.The standard-suite assertions were validated on a live EKS cluster, since the claim is about what reaches CloudWatch rather than what the config renders to: config applied to the running agent and cluster scraper, pods restarted, 30 minutes to settle, then
test/otel/standard -computeType=EKSasserted on datapoints read back from CloudWatch. The suite was run before the change too, because an "attribute is absent" assertion passes trivially against empty data.TestDeprecatedSemconvAttributesRemovedTestRawLabelsOnlyAtDatapointScopeNo failures, no skips.
TestDeprecatedSemconvAttributesRemovedfailing before the change is the result that matters most here: it is the assertion that would have caught the original inversion, and it only passes once the current-spelling twins are the ones left in place.The dcgm, neuron and karpenter pipelines were checked on the same cluster. The gpu and neuron suites' new tests pass once their host-type lists point at the cluster's
g5.xlargeandtrn1.32xlarge:TestDCGMDeprecatedSemconvAttributesRemovedandTestDCGMRawLabelsOnlyAtDatapointScope6 of 6 each, withTestDCGMHasRawPromotedKeys6 of 6 while a GPU workload ran so that the datapoint copies were observable, andTestNeuronDeprecatedSemconvAttributesRemoved4 of 4. Karpenter was checked by querying CloudWatch directly, because the Karpenter version on that cluster emits only 13 of the suite's 26 metric names: across 2,765 series, no deprecated attribute and no raw label at resource scope,url.schemepresent on every series, andpod,namespaceandnodepresent at datapoint scope.The
vllm,kserve_controlplane,knative_dataplaneandknative_controlplanepipelines have no live-cluster evidence, because the validation cluster runs none of those solutions. They are covered by the render assertions above.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Related pull requests
PR Checklist