opentelemetry-go
opentelemetry-go copied to clipboard
Trace sdk processor metrics
Adds otel.sdk.processor.span.queue.size, otel.sdk.processor.span.queue.capacity, and otel.sdk.processor.span.processed.count metrics to the trace batch span processor.
These are defined in https://github.com/open-telemetry/semantic-conventions/blob/cb11bb9bac24f4b0e95ad0f61ce01813d8ceada8/docs/otel/sdk-metrics.md, and are experimental. Because of this, metrics are behind the OTEL_GO_X_SELF_OBSERVABILITY feature gate.
Given the feature is experimental, it always uses the global meterprovider when enabled.
Codecov Report
:x: Patch coverage is 80.64516% with 12 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 83.0%. Comparing base (c5e68b2) to head (e162018).
:warning: Report is 1 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| sdk/trace/batch_span_processor.go | 80.3% | 8 Missing and 4 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #6393 +/- ##
=====================================
Coverage 82.9% 83.0%
=====================================
Files 264 264
Lines 24574 24634 +60
=====================================
+ Hits 20392 20451 +59
+ Misses 3802 3800 -2
- Partials 380 383 +3
| Files with missing lines | Coverage Δ | |
|---|---|---|
| sdk/trace/provider.go | 86.4% <ø> (+1.0%) |
:arrow_up: |
| sdk/trace/tracer.go | 95.9% <100.0%> (ø) |
|
| sdk/trace/batch_span_processor.go | 80.4% <80.3%> (+2.1%) |
:arrow_up: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
I remember why I didn't get this merged now... Unit tests for the queue size are hard to write without race conditions.
Figured out how to get unit tests to work.
@pellared rebased on your PR, and updated to use your feature gate
Codecov failure is from not testing otel.Handle(err) calls.