Add tracetest example for testing instrumentation#7107
Merged
pellared merged 2 commits intoopen-telemetry:mainfrom Sep 1, 2025
adity1raut:main
Merged
Add tracetest example for testing instrumentation#7107pellared merged 2 commits intoopen-telemetry:mainfrom adity1raut:main
pellared merged 2 commits intoopen-telemetry:mainfrom
adity1raut:main
Conversation
Signed-off-by: adity1raut <araut7798@gmail.com>
Member
|
Can you also add an example based on |
Member
|
Please add a CHANGELOG. |
Member
|
As two additional supplements (currently under discussion):
cc @pellared |
Member
Please don't. This is not a user-facing change. |
pellared
approved these changes
Jul 31, 2025
flc1125
approved these changes
Jul 31, 2025
dmathieu
approved these changes
Jul 31, 2025
Member
It is kind of user-facing (public docs). But I am also fine not adding a changelog entry for it. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7107 +/- ##
=====================================
Coverage 82.9% 82.9%
=====================================
Files 265 265
Lines 24894 24894
=====================================
+ Hits 20644 20645 +1
+ Misses 3875 3874 -1
Partials 375 375 🚀 New features to boost your workflow:
|
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
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.
Fixes #7051
This PR adds a basic example demonstrating how to test tracing instrumentation using the tracetest.SpanRecorder from the OpenTelemetry SDK.
✅ It ensures:
A span is emitted when a function is instrumented
The span name is as expected
Inspired by:
logtest package example