[o11y] Fix tail worker test with unstable and incomplete outcome#6517
Merged
[o11y] Fix tail worker test with unstable and incomplete outcome#6517
Conversation
images-api-instrumentation-test uses traceId as its span identification key, which does not uniquely identify spans (unlike spanId). This led to us missing out on spans reported under the same traceId, having span tags be assigned to the wrong span, and changed the test results when reporting span tags earlier, falsely creating the impression that #6051 would introduce span reporting bugs. This can be avoided by using the same tail handler that similar tests already use.
Contributor
|
The images test now follows the exact same pattern as d1. The change is straightforward and correct:
The new expected spans list is much larger because the shared handler correctly captures every span individually, whereas the old handler was silently overwriting spans that shared the same traceId. This is a test-only change with no production code impact, no backward compatibility concerns, and no security implications. The fix is well-motivated by the PR description. LGTM |
mar-cf
approved these changes
Apr 8, 2026
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.
images-api-instrumentation-test uses traceId as its span identification key, which does not uniquely identify spans (unlike spanId). This led to us missing out on spans reported under the same traceId, having span tags be assigned to the wrong span, and changed the test results when reporting span tags earlier, falsely creating the impression that #6051 would introduce span reporting bugs. This can be avoided by using the same tail handler that similar tests already use.
This test seriously discombobulated me, was really confusing while working on #6051. By fixing this we avoid future confusion.