Repository navigation
Support sequential auto-instrumentation client replacement - #87
Merged
Merged
Conversation
Coverage report
Top uncovered files
|
Merged
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.
Closing the first SDK client leaves process-wide framework patches bound to it, so enabling instrumentation on a replacement client silently produces no telemetry. Introduce a shared weak ownership route that installed factory patches resolve dynamically, without reinstalling the patches.
Ownership contract
init()replaces a closed default. Failed initialization closes its newly created client while preserving the prior default and its active sampler. Repeated close is idempotent. Ownership locking resets after fork. In-flight work should finish before closing/replacing the SDK client.The compatibility suite now constructs and closes a client per test instead of working around #74 with a process-long singleton. Explicit replacement regressions cover real ONNX sessions and OpenAI/Anthropic provider clients, including unchanged old-object ownership.
Fixes #74.
Validation
client-replacement-local-6ea1fbaa70a7.Live OpenAI/Anthropic requests were not made; their compatibility checks use mocked HTTP. Existing objects must be recreated to participate in the new client's telemetry lifecycle.