-
Notifications
You must be signed in to change notification settings - Fork 227
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: span compression bug where a buffered span would not be sent whe…
…n an incompressible sibling ended (#3076) https://github.com/elastic/apm/blob/main/specs/agents/handling-huge-traces/tracing-spans-compress.md#span-buffering says: > A buffered span gets reported when > 1. its parent ends > 2. a non-compressible sibling ends Before this change, case 2 was not being handled. Further, a possibly buffered span on the ending sibling would incorrectly get sent *twice*. The scenario is as follows: trans t0 span s1: _bufferdSpan=s2 span s2: ended, compressible -> buffered on s1 span s3: incompressible, _bufferdSpan=s4 span s4: ended, compressible -> buffered on s3 What happens when s3 ends? We expect: - s4 is encoded and sent - s2 is encoded and sent - s3 is encoded and sent Before this change the agent would send: s4, s4, s3 Refs: https://discuss.elastic.co/t/apm-agent-send-duplicate-record-in-mysql/321440
- Loading branch information
Showing
4 changed files
with
81 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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