feat: add opt-in structured logging - #253
Open
EliteCoder18 wants to merge 2 commits into
Open
Conversation
EliteCoder18
requested review from
luisschwab and
oleonardolima
as code owners
September 5, 2026 16:41
EliteCoder18
force-pushed
the
feat/optional-tracing-logging
branch
from
September 5, 2026 16:47
75e9597 to
97e5107
Compare
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
Closes #246.
Adds an optional
logfeature backed bytracing.When enabled, the client emits structured events for:
DEBUGTRACEDEBUGThe events include the client mode, HTTP method, request path, attempt number, response status, and retry delay where applicable.
Base URLs, proxy values, headers, and request and response bodies are omitted. Request paths remain visible and may contain addresses or transaction IDs.
The
tracingdependency remains optional. Itslogcompatibility allows applications using loggers such asenv_loggerto receive these events without configuring an additional bridge.Adds tests covering structured event fields, request and retry lifecycles, sensitive-data omission, blocking and async clients, and
logfacade compatibility.Notes to the reviewers
The tests are split by responsibility:
logging.rsverifies structured tracing events, request and retry lifecycles, and sensitive-data omission for blocking and async clients.log_compat.rsverifies that the same events are available through thelogfacade for applications using loggers such asenv_logger.The minimum and recent lockfiles were updated for the optional
tracingdependency.Changelog notice
feat(log): add opt-in structured logging