Skip to content

Implement semconv span processor health metrics #7441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

JonasKunz
Copy link
Contributor

Implements the new semantic conventions SDK health metrics for span processors:

  • otel.sdk.processor.span.processed for both the SimpleSpanProcessor and BatchingSpanProcessor
  • otel.sdk.processor.span.queue.size for BatchingSpanProcessor
  • otel.sdk.processor.span.queue.capacity for BatchingSpanProcessor

The metrics are opt-in at the moment and can be enabled via the builders of the processors.
Support for the legacy metrics exposed by the BatchingSpanProcessor is kept. Those are disabled by default too (default MeterProvider is noop) and can be enabled using the same API usage as before (= by providing a MeterProvider).

Copy link

codecov bot commented Jun 24, 2025

Codecov Report

Attention: Patch coverage is 89.26554% with 19 lines in your changes missing coverage. Please review.

Project coverage is 89.76%. Comparing base (0ca502b) to head (4b6cf93).

Files with missing lines Patch % Lines
...ernal/metrics/LegacyBatchSpanProcessorMetrics.java 89.09% 3 Missing and 3 partials ⚠️
.../internal/metrics/SemConvSpanProcessorMetrics.java 90.62% 2 Missing and 4 partials ⚠️
...k/trace/internal/metrics/SpanProcessorMetrics.java 63.63% 2 Missing and 2 partials ⚠️
...ace/internal/metrics/NoopSpanProcessorMetrics.java 50.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7441      +/-   ##
============================================
- Coverage     89.77%   89.76%   -0.02%     
- Complexity     6994     7032      +38     
============================================
  Files           798      802       +4     
  Lines         21200    21335     +135     
  Branches       2058     2070      +12     
============================================
+ Hits          19033    19152     +119     
- Misses         1503     1511       +8     
- Partials        664      672       +8     

☔ 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.

@JonasKunz JonasKunz marked this pull request as ready for review June 24, 2025 12:09
@JonasKunz JonasKunz requested a review from a team as a code owner June 24, 2025 12:09
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.

1 participant