Skip to content

Commit 8dd6a12

Browse files
committed
Fix error details not being logged in the tracing's span event
The span event "error" logs a field called "error" that is expected to contain the error's details, but is instead displaying as a boolean on Honeycomb. This is causing us to miss some important information when debuging an error span. This issue seems to be that a field called "error" is already definded as boolean. A solution would be to rename this field, in this specific span event, to something like "error.details" (we already have "error.id" and "error.kind").
1 parent 750d149 commit 8dd6a12

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Error tracing spans not logging the details.
13+
1014
## [6.45.20] - 2023-08-30
1115
### Changed
1216
- Remove sampling decision from runtime

src/tracing/errorReporting/ErrorReport.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class ErrorReport extends ErrorReportBase {
6161
}
6262

6363
const serializableError = this.toObject()
64-
span.log({ event: 'error', ...indexedLogs, error: serializableError })
64+
span.log({ event: 'error', ...indexedLogs, 'error.details': serializableError })
6565

6666
if (logger && this.shouldLogToSplunk(span)) {
6767
logger.error(serializableError)

0 commit comments

Comments
 (0)