Skip to content

feat(kube-stack): add top-level resourceAttributes - #2393

Merged
jaronoff97 merged 5 commits into
open-telemetry:mainfrom
kangyili:kube-stack/resourceAttributes
Sep 9, 2026
Merged

feat(kube-stack): add top-level resourceAttributes#2393
jaronoff97 merged 5 commits into
open-telemetry:mainfrom
kangyili:kube-stack/resourceAttributes

Conversation

@kangyili

@kangyili kangyili commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a top-level resourceAttributes: {} map to the opentelemetry-kube-stack
chart, providing a single place to set default resource attributes (e.g.
deployment.environment.name, k8s.cluster.name) that apply to both the collectors this
chart deploys and the Instrumentation CR it manages. Previously, users had
to duplicate the same attributes in two unrelated places: manually as a
resource processor in each collector's config, and again in
instrumentation.resource.resourceAttributes.

Wiring:

  • Collectors: the map is rendered as a resource/global processor with
    action: upsert and appended to every existing pipeline (traces, metrics,
    logs). upsert semantics ensure explicit values here take precedence over
    anything auto-detected earlier in the pipeline (e.g. by
    resourcedetection).
  • Instrumentation CR: the map is merged as defaults into
    instrumentation.resource.resourceAttributes; any per-key value already set
    in the instrumentation section wins on conflict, preserving existing
    behavior for users who already configure it there.
  • Per-collector override: collectors.<name>.resourceAttributes is also
    accepted and overlays the top-level map (per-collector keys win) so a
    specific collector pool can extend or override the defaults.

Link to tracking issue

Fixes #2338

Authorship

  • I, a human, wrote this pull request description myself.

@kangyili
kangyili requested review from a team and jaronoff97 as code owners September 7, 2026 15:04
@kangyili

kangyili commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

cc @cyrille-leclerc

cyrille-leclerc and others added 4 commits September 8, 2026 23:13
Resolve conflict in templates/collector.yaml: adopt upstream's new
`opentelemetry-kube-stack.mergeCollector` helper (from the
`inheritDefaultCRConfig` feature, open-telemetry#2394) while preserving the
`resourceAttributes` entry added to the `$merged` dict on this branch.

Bump chart version to 0.20.8 since upstream already tagged 0.20.7 with
only the inheritDefaultCRConfig feature, and this merge adds
`resourceAttributes` on top. Regenerate examples accordingly.

Assisted-by: Claude Opus 4.7 (1M context)
@jaronoff97
jaronoff97 merged commit 2831f5d into open-telemetry:main Sep 9, 2026
6 checks passed
@jaronoff97

Copy link
Copy Markdown
Contributor

thank you for your contribution! 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[opentelemetry-kube-stack] Add top-level resourceAttributes to set default resource attributes across collectors and Instrumentation

3 participants