-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[WIP] Encapsulate the trace SDK observability #7316
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
Closed
Closed
Conversation
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
e5564f3 to
b815c33
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7316 +/- ##
=====================================
Coverage 82.9% 83.0%
=====================================
Files 266 268 +2
Lines 24984 25010 +26
=====================================
+ Hits 20733 20762 +29
+ Misses 3876 3873 -3
Partials 375 375
🚀 New features to boost your workflow:
|
d3d8b44 to
576acf8
Compare
Allow future optimization.
fd2a3eb to
c210151
Compare
This was referenced Sep 8, 2025
Contributor
Author
MrAlias
added a commit
that referenced
this pull request
Sep 15, 2025
Split from #7316 [Follow guidelines](https://github.com/open-telemetry/opentelemetry-go/blob/a5dcd68ebb2f3669f7685ac7b0f3f1624251a381/CONTRIBUTING.md#encapsulation) and move instrumentation into its own type. ### Benchmarks #### Added `sdk/trace/internal/observ` benchmarks ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/trace/internal/observ cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz │ enc-trace-sdk-bsp-obs.out │ │ sec/op │ BSP/Processed-8 0.6394n ± 2% BSP/ProcessedQueueFull-8 0.6806n ± 3% BSP/Callback-8 3.591µ ± 12% geomean 11.60n │ enc-trace-sdk-bsp-obs.out │ │ B/op │ BSP/Processed-8 0.000 ± 0% BSP/ProcessedQueueFull-8 0.000 ± 0% BSP/Callback-8 2.626Ki ± 0% geomean ¹ ¹ summaries must be >0 to compute geomean │ enc-trace-sdk-bsp-obs.out │ │ allocs/op │ BSP/Processed-8 0.000 ± 0% BSP/ProcessedQueueFull-8 0.000 ± 0% BSP/Callback-8 16.00 ± 0% geomean ¹ ¹ summaries must be >0 to compute geomean ``` #### Existing `sdk/trace` benchmarks None
MrAlias
added a commit
that referenced
this pull request
Sep 15, 2025
Split from #7316 [Follow guidelines](https://github.com/open-telemetry/opentelemetry-go/blob/a5dcd68ebb2f3669f7685ac7b0f3f1624251a381/CONTRIBUTING.md#encapsulation) and move instrumentation into its own type. ### Benchmarks #### Added `sdk/trace/internal/observ` benchmarks ``` goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/trace/internal/observ cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz │ enc-trace-sdk-tracer-obs.out │ │ sec/op │ Tracer/SpanStarted-8 7.436n ± 6% Tracer/SpanLive-8 9.987n ± 8% Tracer/SpanEnded-8 11.32n ± 7% NewTracer-8 87.64n ± 6% geomean 16.48n │ enc-trace-sdk-tracer-obs.out │ │ B/op │ Tracer/SpanStarted-8 0.000 ± 0% Tracer/SpanLive-8 0.000 ± 0% Tracer/SpanEnded-8 0.000 ± 0% NewTracer-8 0.000 ± 0% geomean ¹ ¹ summaries must be >0 to compute geomean │ enc-trace-sdk-tracer-obs.out │ │ allocs/op │ Tracer/SpanStarted-8 0.000 ± 0% Tracer/SpanLive-8 0.000 ± 0% Tracer/SpanEnded-8 0.000 ± 0% NewTracer-8 0.000 ± 0% geomean ¹ ¹ summaries must be >0 to compute geomean ``` #### Existing `sdk/trace` benchmarks ```console > benchstat main.out enc-trace-sdk-tracer-obs.out goos: linux goarch: amd64 pkg: go.opentelemetry.io/otel/sdk/trace cpu: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz │ main.out │ enc-trace-sdk-tracer-obs.out │ │ sec/op │ sec/op vs base │ SpanEnd/ObservabilityEnabled-8 188.5n ± 4% 131.5n ± 32% -30.24% (p=0.000 n=10) TraceStart/ObservabilityEnabled-8 886.9n ± 8% 663.9n ± 2% -25.14% (p=0.000 n=10) geomean 408.9n 295.5n -27.73% │ main.out │ enc-trace-sdk-tracer-obs.out │ │ B/op │ B/op vs base │ SpanEnd/ObservabilityEnabled-8 16.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10) TraceStart/ObservabilityEnabled-8 608.0 ± 0% 576.0 ± 0% -5.26% (p=0.000 n=10) geomean 98.63 ? ¹ ² ¹ summaries must be >0 to compute geomean ² ratios must be >0 to compute geomean │ main.out │ enc-trace-sdk-tracer-obs.out │ │ allocs/op │ allocs/op vs base │ SpanEnd/ObservabilityEnabled-8 1.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10) TraceStart/ObservabilityEnabled-8 5.000 ± 0% 3.000 ± 0% -40.00% (p=0.000 n=10) geomean 2.236 ? ¹ ² ¹ summaries must be >0 to compute geomean ² ratios must be >0 to compute geomean ``` --------- Co-authored-by: Copilot <[email protected]>
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.
No description provided.