Add calibrate.tracing.log for non-blocking trace sending - #3
Open
dalmia wants to merge 1 commit into
Open
Conversation
The generated client waits for the HTTP response, which is the wrong trade in a request path: a slow or unreachable Calibrate would slow down the agent it is only meant to observe. log() hands the POST to a background thread, and a failed send is logged and dropped rather than raised. Handwritten, so both files are listed in .fernignore to survive the next fern generate. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Returns immediately. The POST runs on a background thread, and a failed send is logged and dropped, so an unreachable Calibrate never slows down or breaks the agent it is only meant to observe. The generated client waits for the response, which is the wrong trade in a request path.
Reads
CALIBRATE_API_KEYandCALIBRATE_BASE_URL, or takes both as arguments.src/calibrate/tracing.pyandtests/test_tracing.pyare handwritten, so both are listed in.fernignoreto survive the nextfern generate.Needs ARTPARK-SAHAI-ORG/calibrate-backend#181 deployed before
POST /tracesaccepts these calls.3 tests pass.
🤖 Generated with Claude Code