Repository navigation
Remove OTEL_SEMCONV_STABILITY_OPT_IN env var support - #626
Merged
Merged
Conversation
v1.24.0 metrics (db.sql.latency), legacy db.statement attribute, and the 3-mode stability system (None/Dup/Stable). Only stable v1.40.0 semantics remain. Closes #617
OTEL_SEMCONV_STABILITY_OPT_IN env var support
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #626 +/- ##
=======================================
- Coverage 85.9% 85.5% -0.4%
=======================================
Files 16 15 -1
Lines 967 694 -273
=======================================
- Hits 831 594 -237
+ Misses 109 74 -35
+ Partials 27 26 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Removes support for the OTEL_SEMCONV_STABILITY_OPT_IN env var and fully standardizes this library on stable OpenTelemetry Semantic Conventions v1.40.0 for both traces and metrics (per #617).
Changes:
- Deleted env-var parsing and all “stability opt-in” branching; always emit stable semantics.
- Removed legacy
db.sql.latencymetric instrument and legacy metric test cases; keep onlydb.client.operation.duration. - Removed legacy
db.statementspan attribute behavior; use stabledb.query.textconsistently and update docs/tests accordingly.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| utils.go | Removes legacy metric emission and stability branching; always records db.client.operation.duration and uses db.query.text attributes. |
| instruments.go | Removes legacy latency histogram instrument creation. |
| internal/semconv/env.go | Deleted env var support (stability opt-in). |
| internal/semconv/env_test.go | Deleted tests for removed env var parsing. |
| internal/semconv/attributes.go | Simplifies query text attributes helper to stable db.query.text only. |
| internal/semconv/attributes_test.go | Updates tests to reflect stable-only db.query.text behavior. |
| utils_test.go | Removes stability opt-in table cases and legacy metric expectations; removes env-var setup. |
| utils_bench_test.go | Removes stability opt-in configuration from benchmarks. |
| config.go | Removes stability-related fields/initialization and updates docs to db.query.text. |
| config_test.go | Removes tests/assertions tied to stability/env-var behavior. |
| instruments_test.go | Removes assertion for legacy latency instrument. |
| conn_test.go | Removes env-var setup in tests. |
| connector_test.go | Removes env-var setup in tests. |
| stmt_test.go | Removes env-var setup in tests. |
| rows_test.go | Removes env-var setup in tests. |
| tx_test.go | Removes env-var setup in tests. |
| README.md | Removes stability migration documentation and legacy metric docs; updates semconv links to v1.40.0. |
| CHANGELOG.md | Adds breaking-change note for removal of env var, legacy metric, and db.statement. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Only stable v1.40.0 semantics remain.
Closes #617