Repository navigation
test(telemetry): add two supplemental tests for #7694 - #1
Open
GBX-Max1220 wants to merge 1 commit into
Open
GBX-Max1220 wants to merge 1 commit into
GBX-Max1220 wants to merge 1 commit into
Conversation
Cover the LiteLlm aggregate fix from the two gaps left by the existing tests: an interrupted stream keeps its partial output messages on the exported span, re-raises the original exception, and ends as ERROR; and EVENT_ONLY mode emits one completion log record containing only the aggregate, not the chunks.
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.
Adds two supplemental regression tests for the LiteLlm stream/aggregate fix in google#7694, as a reviewable code diff replacing the earlier ZIP attachment.
Base:
2c5773f0(current head offix-litellm-stream-output-once). Onlytests/unittests/telemetry/test_instrumentation.pychanges; no production code.test_interrupted_stream_propagates_error_and_keeps_partial_messages— a stream raising before its aggregate re-raises the original exception, keeps the already-recorded partial output messages on the exported span, and finishes withERRORstatus.test_aggregate_is_recorded_once_in_completion_event— underEVENT_ONLY, the completed inference emits a single completion log record whose output messages contain only the aggregate, not the chunks.No overlap with the four tests already in the PR: the existing cutoff test reads in-flight span details and swallows the error, while the new one asserts exception identity, final exported attributes, and status; all existing tests use
SPAN_ONLY, while the new one covers theEVENT_ONLYlog path.Verification (Python 3.12,
OTEL_TRACES_SAMPLER=always_on,PYTHONPATH=src):No full-suite run is claimed.