Corrupted documentation in actix-web online guide
redvg opened this issue · 8 comments
If you were to follow https://docs.sentry.io/platforms/rust/guides/actix-web/#example you would land into 2 problems:
- in example the main thread is wrapped with #[actix_web::main], which is actually incompatible with sentry. you should remove this macro, and then start futures runtime on your own
- a sentry::init() call cannot be encapsulated in a dedicated function, since sentry client will be disposed. but this behaviour is not documented, tho such pattern is quite common
Can you expand on the errors you get? I can run the example without issue.
there are no errors but nothing will get reported
I'm sorry, I can't reproduce the problem. For me the example works as written, with the caveat that actix-web
must be added to Cargo.toml
.
A colleague has pointed out to me that we seem to have been talking at cross-purposes—your assessment of the problems is correct, but the example itself is so simple that running it won't trigger them. Thank you very much for the report and sorry for the confusion.
I also opened getsentry/sentry-docs#7633 to warn about #[tokio::main]
and [#actix_web::main]
in general.
thanks! this will now save great amount of time
Fixed via getsentry/sentry-docs#7630 and getsentry/sentry-docs#7633. Thanks again for the report and the patience @redvg!