gleam_sentry

https://develop.sentry.dev/sdk/unified-api/

Types

A Client is the part of the SDK that is responsible for event creation. To give an example, the Client should convert an exception to a Sentry event. The Client should be stateless, it gets the Scope injected and delegates the work of sending the event to the Transport.

pub type Client {
  Client(
    host: String,
    key: String,
    project_id: String,
    environment: String,
  )
}

Constructors

  • Client( host: String, key: String, project_id: String, environment: String, )

Functions

pub fn capture_exception(
  client: Client,
  exception: ExitReason,
  stacktrace: List(tuple(Atom, String, Int, String, Int)),
  timestamp: Int,
) -> Result(Response(String), Dynamic)

capture an erlang runtime exception

pub fn init(
  dsn: String,
  environment: String,
) -> Result(Client, Nil)

Initialise a Sentry client with a DSN and environment.