Skip to content

Commit b571353

Browse files
committed
sentry: Add documentation
1 parent c254961 commit b571353

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/sentry.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
use sentry::{ClientInitGuard, ClientOptions, IntoDsn};
22
use std::borrow::Cow;
33

4+
/// Initializes the Sentry SDK from the environment variables.
5+
///
6+
/// If `SENTRY_DSN_API` is not set then Sentry will not be initialized,
7+
/// otherwise it is required to be a valid DSN string. `SENTRY_ENV_API` must
8+
/// be set if a DSN is provided.
9+
///
10+
/// `HEROKU_SLUG_COMMIT`, if present, will be used as the `release` property
11+
/// on all events.
412
#[must_use]
513
pub fn init() -> Option<ClientInitGuard> {
614
dotenv::var("SENTRY_DSN_API")

0 commit comments

Comments
 (0)