getsentry/sentry-cli

Opt-in Sentry Instrumentation (errors only)

Closed this issue · 1 comments

We do not currently instrument Sentry CLI with Sentry because users may not want us to know about how they are using Sentry CLI.

However, having Sentry instrumented in Sentry CLI might assist with debugging errors which are difficult for us to reproduce by allowing us to obtain from users a full stack trace of their error. #2189 was an attempt at allowing users to enable backtraces with the RUST_BACKTRACE=1 environment variable, but the change is insufficient because release builds don't include debug symbols, meaning that these stack traces are only really useful in a debug build.

To maintain user privacy, the Sentry instrumentation would be disabled by default, and would only be enabled when a certain environment variable (e.g. SENTRY_REPORT_ERROR) is set.

The CLI would then capture any errors that would crash the CLI and send them to Sentry, also outputting the event ID if this is possible.

Duplicate of #1821