fix(instrumentation): demote per-call and setup logs to debug#95
Merged
sohil-kshirsagar merged 1 commit intomainfrom Apr 21, 2026
Merged
Conversation
Customers initializing with the default logger were seeing internal SDK chatter on every psycopg2/psycopg3 connect and every Django request, plus one-time setup noise at process startup. All of these should have been debug-level; the convention was already established in the redis and psycopg3-sync paths. Also adds logging-level rules to .cursor/BUGBOT.md to prevent this class of issue on future instrumentations.
Contributor
sohankshirsagar
approved these changes
Apr 21, 2026
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.

Demote per-call and one-time-setup instrumentation logs from
infotodebug, so customers initializing withTuskDrift.initialize(env=...)and no logger overrides don't see internal SDK chatter in their application output.Why
A customer reported seeing
[TuskDrift] [PATCHED_CONNECT] psycopg2.connect() called / mode: ... / app_ready: ... / RECORD mode: Connected to database successfullyspam on every DB connection. The SDK's default log level isinfo(drift/core/logger.py), and these lines were emitted aslogger.info(...)instead oflogger.debug(...). Every psycopg2 connect produced 4 INFO lines; every Django request produced 2.The convention was already correct in
drift/instrumentation/redis/instrumentation.pyand the sync paths indrift/instrumentation/psycopg/instrumentation.py(both usedebug) — this PR makes the rest of the instrumentations match.Guardrail
Added a
## Logging Levelssection to.cursor/BUGBOT.mdcovering:debug.debug(matching the established convention) — and never include the patched function's repr.infois reserved for events a customer benefits from seeing once per process (e.g. "App marked as ready", circuit breaker transitions).infoeven once.What stays at
infoGenuine one-time-per-process events where a customer is likely to want visibility:
"App marked as ready", Rust-core enable/disable at startup, circuit breaker state transitions, time-travel activation.