fix: End BIDI gRPC transactions on response send instead of stream close#2758
Open
nlakhera wants to merge 1 commit intonewrelic:mainfrom
Open
fix: End BIDI gRPC transactions on response send instead of stream close#2758nlakhera wants to merge 1 commit intonewrelic:mainfrom
nlakhera wants to merge 1 commit intonewrelic:mainfrom
Conversation
For bidirectional streaming gRPC calls, transactions now end when the first response is sent rather than when the stream closes. This provides accurate transaction durations (typically 2-10ms) instead of measuring the entire stream lifecycle (30-180 seconds). Changes: - ServerImpl_Instrumentation: Detect BIDI streaming and mark streams - ServerStream_Instrumentation: Instrument writeMessage() to expire token after first response is sent - Only affects BIDI_STREAMING, other gRPC types unchanged Fixes issue where transaction duration included stream idle time and upstream service latency, making performance monitoring ineffective. Related: Internal discussion on gRPC transaction instrumentation
|
|
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.
Overview
For bidirectional streaming gRPC calls, transactions now end when the first response is sent rather than when the stream closes. This provides accurate transaction durations (typically 2-10ms) instead of measuring the entire stream lifecycle (30-180 seconds).
Changes:
Fixes issue where transaction duration included stream idle time and upstream service latency, making performance monitoring ineffective.
Related: Internal discussion on gRPC transaction instrumentation
Before contributing, please read our contributing guidelines and code of conduct.
Related Github Issue
Include a link to the related GitHub issue, if applicable
Testing
The agent includes a suite of tests which should be used to
verify your changes don't break existing functionality. These tests will run with
Github Actions when a pull request is made. More details on running the tests locally can be found
here,
Checks