Skip to content

perf: dont attach stacktraces to all events - #2284

Merged
Litarnus merged 1 commit into
masterfrom
stacktrace-short-circuit
Oct 19, 2026
Merged

Litarnus merged 1 commit into
masterfrom
stacktrace-short-circuit

Conversation

@Litarnus

Copy link
Copy Markdown
Collaborator

This PR combines two performance improvements:

  1. exit early when the event is not sampled
  2. Do not attach stacktraces to events other than error events. This only affects users that configured the attach_stacktrace option. Currently we did attach it to all events when this was enabled, which was unnecessary

The only change is that events passed to the logger no longer carry the stacktrace, but I don't think that this justifies building it for each event even though it's discarded

@Litarnus
Litarnus merged commit 7cf7aa7 into master Oct 19, 2026
52 checks passed
@Litarnus
Litarnus deleted the stacktrace-short-circuit branch October 19, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants