-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Encapsulate SDK Tracer observability #7331
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
Encapsulate SDK Tracer observability #7331
Conversation
57eb2d4 to
6d02ae4
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7331 +/- ##
=======================================
- Coverage 85.4% 85.4% -0.1%
=======================================
Files 267 268 +1
Lines 24295 24297 +2
=======================================
+ Hits 20758 20759 +1
- Misses 3160 3161 +1
Partials 377 377
🚀 New features to boost your workflow:
|
58591c0 to
cccf667
Compare
cccf667 to
10b4c11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR encapsulates SDK Tracer observability functionality by moving instrumentation logic from the main tracer type into a dedicated internal observability package. The refactoring improves maintainability by separating concerns and provides better performance through optimized attribute caching.
- Extracts observability instrumentation into a new
sdk/trace/internal/observpackage - Replaces direct metric handling in tracer with a dedicated
observ.Tracertype - Updates all references to use the new observability constants and interfaces
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
sdk/trace/tracer.go |
Replaces inline observability fields and logic with observ.Tracer instance |
sdk/trace/provider.go |
Updates tracer creation to use new observ.NewTracer() constructor |
sdk/trace/span.go |
Simplifies span end observability calls using new interface |
sdk/trace/internal/observ/tracer.go |
New observability tracer implementation with optimized attribute caching |
sdk/trace/internal/observ/tracer_test.go |
Comprehensive tests for the new observability functionality |
sdk/trace/trace_test.go |
Updates test expectations to use new observability scope constants |
sdk/trace/provider_test.go |
Adjusts test assertions for new observability interface |
.codespellignore |
Adds "observ" to ignored words list |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Split from #7316
Follow guidelines and move instrumentation into its own type.
Benchmarks
Added
sdk/trace/internal/observbenchmarksExisting
sdk/tracebenchmarks