Skip to content

Commit

Permalink
fix(stdlib): enable event_span logging, even if sentry is used
Browse files Browse the repository at this point in the history
In scenario's where tracing events are sampled, we now also drop all logs, reducing insight when an error happens in an unsampled trace.
  • Loading branch information
dirkdev98 committed May 2, 2024
1 parent 83e580d commit dfc0daa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/stdlib/src/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ export function eventStop(event) {

if (event._compasSentrySpan) {
event._compasSentrySpan.end();
} else if (isNil(event.rootEvent)) {
}
if (isNil(event.rootEvent)) {
event.log.info({
type: "event_span",
aborted: !!event.signal?.aborted,
Expand Down

0 comments on commit dfc0daa

Please sign in to comment.