test(sqlite3): add uninstrument, error status, suppress, and no-op tests#4335
Open
archy-rock3t-cloud wants to merge 2 commits intoopen-telemetry:mainfrom
Open
test(sqlite3): add uninstrument, error status, suppress, and no-op tests#4335archy-rock3t-cloud wants to merge 2 commits intoopen-telemetry:mainfrom
archy-rock3t-cloud wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
JWinermaSplunk
left a comment
There was a problem hiding this comment.
Few comments, also missing a CHANGELOG entry whenever you have a moment.
instrumentation/opentelemetry-instrumentation-sqlite3/tests/test_sqlite3.py
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-sqlite3/tests/test_sqlite3.py
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-sqlite3/tests/test_sqlite3.py
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-sqlite3/tests/test_sqlite3.py
Outdated
Show resolved
Hide resolved
instrumentation/opentelemetry-instrumentation-sqlite3/tests/test_sqlite3.py
Show resolved
Hide resolved
herin049
approved these changes
Mar 17, 2026
Contributor
|
LGTM, just needs a |
Signed-off-by: Artem Muterko <artem@sopho.tech>
500c19e to
a9635ea
Compare
- Add _connect helper with addCleanup for proper resource teardown - Rename test_uninstrument_connection to test_uninstrument_connection_with_instrument for consistency with psycopg2 - Use same query before and after uninstrumenting - Clear memory exporter and assert zero spans after uninstrument - Use sqlite3.OperationalError instead of generic Exception - Add span.status.description assertion for error test - Add CHANGELOG entry Signed-off-by: Artem Muterko <artem@sopho.tech>
Author
|
@JWinermaSplunk @herin049 updated, please take a look, all comments have been addressed. |
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.
Description
The sqlite3 instrumentation had only 3 tests covering basic execute/executemany/callproc. This adds the standard lifecycle tests that other dbapi-based instrumentations (psycopg2, mysql) already have: uninstrument, uninstrument_connection, error status on failed queries, suppress_instrumentation, and NoOpTracerProvider.
Type of change
How Has This Been Tested?
tox -e py314-test-instrumentation-sqlite3— all 8 tests pass (3 existing + 5 new).Does This PR Require a Core Repo Change?
Checklist: