-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Encapsulate stdouttrace.Exporter
instrumentation in internal package
#7307
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7307 +/- ##
=====================================
Coverage 82.9% 82.9%
=====================================
Files 266 267 +1
Lines 24984 24997 +13
=====================================
+ Hits 20733 20744 +11
- Misses 3876 3877 +1
- Partials 375 376 +1
🚀 New features to boost your workflow:
|
477479b
to
404e2ad
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 refactors the stdouttrace.Exporter
self-observability instrumentation by moving it into an internal package following OpenTelemetry Go project guidelines. The change encapsulates the instrumentation logic into a dedicated type to improve code organization and maintainability.
- Extracted self-observability logic into a new
internal/observ
package - Created a dedicated
Instrumentation
type to handle metrics and measurement - Removed extensive test cases from the main test file that are now covered by the internal package tests
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
versions.yaml | Added version reference configuration for the stdouttrace module |
exporters/stdout/stdouttrace/trace_test.go | Simplified tests by using the new observ package constants and removed detailed test cases |
exporters/stdout/stdouttrace/trace.go | Refactored to use the new Instrumentation type from the observ package |
exporters/stdout/stdouttrace/internal/version.go | Added version constant for the internal package |
exporters/stdout/stdouttrace/internal/observ/instrumentation_test.go | New comprehensive test suite for the instrumentation functionality |
exporters/stdout/stdouttrace/internal/observ/instrumentation.go | New package containing the extracted instrumentation logic |
.codespellignore | Added "observ" to the spell check ignore list |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
exporters/stdout/stdouttrace/internal/observ/instrumentation.go
Outdated
Show resolved
Hide resolved
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.
👍
Follow guidelines and move instrumentation into its own type.