Skip to content

Sentry captureMessage calls lack stack traces due to missing attachStacktrace option #295

@astrobot-houston

Description

@astrobot-houston

Originally reported by @JPeer264 in #294.

All community-submitted pull requests are automatically converted to issues (bugs) & discussions (feature requests, enhancements) where they can be triaged and prioritized. Once prioritized, a PR implementation is created automatically.

Describe the Bug

The Sentry tooling blueprint (blueprints/tooling--sentry.md) does not include attachStacktrace: true in the Sentry.init() configuration for either the Node or Cloudflare targets. As a result, error-level messages captured via Sentry.captureMessage(event.message, 'error') are sent to Sentry without any call-site stack trace information, making it difficult to diagnose where the error originated.

Expected Behavior

When an error-level message is captured through Sentry.captureMessage, the resulting Sentry event should include a stack trace pointing to the call site, providing sufficient context to debug the issue.

Steps to Reproduce

  1. Set up a Flue project with the Sentry tooling blueprint (version 2).
  2. Trigger a runtime event that results in a Sentry.captureMessage(event.message, 'error') call.
  3. Open the resulting event in the Sentry dashboard — observe that no stack trace is attached to the message.

Original implementation from #294 by @JPeer264

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions