WO-1582 Add span.recordException - #7081
Open
jmorrell-cloudflare wants to merge 4 commits into
Open
Conversation
Contributor
|
I'm Bonk, and I've done a quick review of your PR. Adds
|
|
The generated output of |
jmorrell-cloudflare
force-pushed
the
jmorrell/span-recordexception
branch
from
August 20, 2026 23:36
34d9a16 to
219c797
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7081 +/- ##
==========================================
- Coverage 67.72% 67.65% -0.08%
==========================================
Files 458 458
Lines 129441 129631 +190
Branches 21167 21223 +56
==========================================
+ Hits 87661 87697 +36
- Misses 28927 29069 +142
- Partials 12853 12865 +12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jmorrell-cloudflare
marked this pull request as ready for review
August 21, 2026 01:24
jmorrell-cloudflare
requested review from
NuroDev,
danlapid,
fhanau and
mar-cf
August 21, 2026 01:24
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.
We currently send uncaught exceptions to the tail worker, but this would allow us to capture them on the span where they were emitted
This adds
span.recordExceptionThe types here should match OpenTelemetry JS's
span.recordException, though we don't yet support passing in your own timestamp:https://github.com/open-telemetry/opentelemetry-js/blob/main/api/src/trace/span.ts#L144-L150
https://github.com/open-telemetry/opentelemetry-js/blob/main/api/src/common/Exception.ts#L6-L38
The STW interface already supports an
exceptionevent. This addscode?: string | numberto the payload.