Conversation
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
This PR adds a fromUserCode signal path so that spans created via ctx.tracing.enterSpan can bypass operation-name allowlists in downstream submitters, and caps user-supplied operation names at 64 bytes.
Issues (highest severity first):
-
[medium]
bool fromUserCodeconstructor parameter violatesWD_STRONG_BOOLconvention. The codebase convention (documented inAGENTS.mdandsrc/workerd/util/AGENTS.md) is "NEVER use boolean arguments; preferWD_STRONG_BOOL." Thebool fromUserCode = falseconstructor parameter and member could silently accept wrong-type booleans (e.g. accidentally passingwasAccepted). Suggestion below. -
[low] No test coverage for
newChildFromUserCode/submitUserSpanOpendistinction or the 64-byte truncation. The existingtracing-helpers-testandtracing-hierarchy-testsuites exerciseenterSpanend-to-end but don't verify that the submitter seessubmitUserSpanOpen(vssubmitSpanOpen) or that names > 64 bytes are truncated. This is fine to defer since testing the submitter dispatch likely requires internal infrastructure, but worth noting.
|
Review posted on PR #6667. Two findings:
The overall design is sound -- the |
This will be used internally to ungate some protections.
ac85538 to
2c770fd
Compare
|
The generated output of |
Merging this PR will degrade performance by 12.72%
Performance Changes
Comparing Footnotes
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6667 +/- ##
==========================================
- Coverage 66.53% 66.52% -0.02%
==========================================
Files 405 405
Lines 115972 115984 +12
Branches 19408 19410 +2
==========================================
- Hits 77160 77155 -5
- Misses 27230 27244 +14
- Partials 11582 11585 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This will be used internally to ungate some protections.