opentelemetry-python-contrib icon indicating copy to clipboard operation
opentelemetry-python-contrib copied to clipboard

opentelemetry-instrumentation-sqlite3: add semconv stability opt-in test coverage

Open SurbhiD404 opened this issue 4 months ago • 1 comments

What problem do you want to solve?

The sqlite3 instrumentation declares semantic convention migration support (_semconv_status = "migration"), but the instrumentation-specific test suite does not currently verify the supported OTEL_SEMCONV_STABILITY_OPT_IN modes.

Recent work has added similar semconv stability test coverage for several other instrumentations, including Cassandra (#4747), pymemcache (#4739), pymongo (#4772), and MySQL (#4810).

Describe the solution you'd like

Add instrumentation-level tests to tests/test_sqlite3.py covering the supported semantic convention modes:

  • default
  • database
  • database/dup

The tests would verify the expected span attributes (legacy vs. stable semantic conventions) and the emitted schema_url, following the existing testing pattern used by other migration-enabled instrumentations.

I implemented these tests locally against the current main branch and verified that the sqlite3 test suite passes without requiring any production code changes. I'd be happy to open a PR implementing this if the approach looks reasonable.

Describe alternatives you've considered

No response

Additional Context

No response

Would you like to implement a fix?

I'd be happy to open a PR implementing this

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

SurbhiD404 avatar Jul 22 '26 00:07 SurbhiD404

Dup of https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4836

xrmx avatar Jul 22 '26 15:07 xrmx