Skip to content

Add option attach_stacktrace #1097

Closed

Description

@EvgenPervenenko

Description
When enabled option, for example, attach_stacktrace, stack traces are automatically attached to all logged messages. While stack traces are always included with exceptions, enabling this option also attaches stack traces to regular messages(or for SENTRY_LEVEL_FATAL messages only). This feature ensures that stack traces are visible alongside all log messages, providing comprehensive context for debugging and issue resolution.

Use case
Capturing Steps to Reproduce Issues: For events logged from client functions, different stack traces can help identify the exact steps that led to the issue, making it easier to reproduce and resolve.

Grouping in Sentry: Sentry groups events differently depending on whether they include stack traces. As a result, enabling or disabling this flag for certain events will lead to new groups being formed.

Interface Changes
add function

sentry_options_set_attach_stacktrace

using:

sentry_options_t *options = sentry_options_new();
sentry_options_set_attach_stacktrace(options, 1);

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Dec 5, 2024
  2. changed the title [-][Feature Request] Add configuration option for attach stacktrace to message event[/-] [+][Feature Request] Add configuration option to attach stacktrace to message events[/+] on Dec 5, 2024
  3. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Dec 5, 2024
  4. changed the title [-][Feature Request] Add configuration option to attach stacktrace to message events[/-] [+]Add option `attach_stacktrace`[/+] on Dec 5, 2024
  5. added
    Improvement
    on Apr 8, 2025
  6. added
    Native
    and removed on Aug 8, 2025
  7. added
    Errors
    and removed on Mar 26, 2026
  8. added a commit that references this issue on Oct 15, 2026
    d04453d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ErrorsGood First IssueImprovementNative

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions