Forward telemetry in a separate thread#1973
Merged
Merged
Conversation
… alex/forwarder-thread-base
… alex/forwarder-thread-base
Contributor
There was a problem hiding this comment.
2 issues found
Confidence score: 3/5
- There is a concrete medium-risk behavior in
logfire/_internal/config.py: the shutdown path may lazy-initialize the variable provider, which can trigger remote variable machinery during teardown instead of cleanly shutting down. - A secondary timing issue in
logfire/_internal/config.pyuses wall-clock time for timeout budgeting; clock changes could skew remaining time and cause premature or delayed timeout handling. - Given one high-confidence 6/10 issue affecting shutdown behavior, this carries some regression risk and should be addressed before relying on this as a low-risk merge.
- Pay close attention to
logfire/_internal/config.py- shutdown/provider invocation and timeout budget calculations are the key risk points.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
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.
logfire.experimental.forwardingnow forwards OTLP payloads asynchronously.The
forward_export_request()andlogfire_proxy()helpers now enqueue accepted payloads locally and return immediately instead of waiting for Logfire. This prevents Logfire outages or slow responses from blocking application request handling.Key user-visible changes:
application/x-protobufandapplication/jsonOTLP payloads are accepted, so that the response can match.bodycan no longer be None.