Skip to content

Remove OTEL_SEMCONV_STABILITY_OPT_IN env var support - #626

Merged
XSAM merged 2 commits into
mainfrom
remove-semconv-stability-optin
Apr 30, 2026
Merged

XSAM merged 2 commits into
mainfrom
remove-semconv-stability-optin

Conversation

@XSAM

@XSAM XSAM commented Apr 30, 2026

Copy link
Copy Markdown
Owner

Only stable v1.40.0 semantics remain.

Closes #617

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
@XSAM XSAM added this to the v0.43.0 milestone Apr 30, 2026
@XSAM XSAM changed the title Remove OTEL_SEMCONV_STABILITY_OPT_IN env var support Remove OTEL_SEMCONV_STABILITY_OPT_IN env var support Apr 30, 2026
@codecov

codecov Bot commented Apr 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.5%. Comparing base (42c7d8a) to head (c8f1b31).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.latency metric instrument and legacy metric test cases; keep only db.client.operation.duration.
  • Removed legacy db.statement span attribute behavior; use stable db.query.text consistently 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.

Comment thread utils.go Resolved
@XSAM
XSAM merged commit 9af8b52 into main Apr 30, 2026
22 checks passed
@XSAM
XSAM deleted the remove-semconv-stability-optin branch April 30, 2026 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the support of OTEL_SEMCONV_STABILITY_OPT_IN

2 participants