-
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
base: main
Are you sure you want to change the base?
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 82.9% 82.9%
=====================================
Files 267 268 +1
Lines 24982 24988 +6
=====================================
+ Hits 20728 20736 +8
+ Misses 3878 3876 -2
Partials 376 376
🚀 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/observ
package - Replaces direct metric handling in tracer with a dedicated
observ.Tracer
type - 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/observ
benchmarksExisting
sdk/trace
benchmarks