getsentry / getsentry/sentry-rust

Unclear from Rustdoc whether `tokio::main` is still incompatible with Sentry crate

Open
#920 8 comments 0 reactions 0 assignees View on GitHub
Docs Rust
Dominant language
Rust
Stars
752
Forks
190
Avg merge
1h 21m
Merged PRs (30d)
5

Description

### Description

It's mentioned [on docs.sentry.io](https://docs.sentry.io/platforms/rust/#async-main-function) that Sentry is not compatible with `tokio::main` and other macros that spawn threads or create an async runtime before Sentry is initialized. Is that still the case? It doesn't seem to be mentioned in [the docs for the `init` function](https://docs.rs/sentry/latest/sentry/fn.init.html) or anywhere else in the Rustdoc.

I have an application that uses `tokio::main` and emits events using `capture_error`, and it's definitely capable of emitting events, but now that I've seen the warning about `tokio::main`, I'm concerned that I may be missing events.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.