Skip to content

Add ability to configure extra span metrics resource attributes - #909

Merged
grcevski merged 1 commit into
open-telemetry:mainfrom
grcevski:extra_resource_attrs_span
Nov 21, 2025
Merged

grcevski merged 1 commit into
open-telemetry:mainfrom
grcevski:extra_resource_attrs_span

Conversation

@grcevski

Copy link
Copy Markdown
Contributor

This PR allows for users to configure extra resource attributes from trace spans to be added to the span metrics, allowing for more flexible metrics usage. For example, a custom resource attribute service.version can now be added to the span metrics.

@grcevski
grcevski requested a review from a team as a code owner November 21, 2025 14:48
@codecov

codecov Bot commented Nov 21, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 9.67742% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.07%. Comparing base (b3fa99f) to head (2d57c8d).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/export/prom/prom.go 8.33% 22 Missing ⚠️
pkg/export/otel/metrics.go 14.28% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #909      +/-   ##
==========================================
- Coverage   55.13%   55.07%   -0.06%     
==========================================
  Files         253      253              
  Lines       21732    21756      +24     
==========================================
+ Hits        11982    11983       +1     
- Misses       8926     8947      +21     
- Partials      824      826       +2     
Flag Coverage Δ
integration-test 23.22% <3.22%> (-0.08%) ⬇️
integration-test-arm 0.00% <0.00%> (ø)
integration-test-vm-${ARCH}-${KERNEL_VERSION} 0.00% <0.00%> (ø)
k8s-integration-test 2.74% <0.00%> (+<0.01%) ⬆️
oats-test 0.00% <0.00%> (ø)
unittests 46.21% <9.67%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@grcevski
grcevski merged commit d313973 into open-telemetry:main Nov 21, 2025
50 checks passed
@grcevski
grcevski deleted the extra_resource_attrs_span branch November 21, 2025 15:28
@MrAlias MrAlias added this to the v0.3.0 milestone Dec 3, 2025
@MrAlias MrAlias mentioned this pull request Dec 3, 2025
marctc pushed a commit to grafana/opentelemetry-ebpf-instrumentation that referenced this pull request Dec 9, 2025
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.

3 participants