package sentry

  1. Overview
  2. Docs
type t' = private {
  1. uri : Uri.t;
  2. public_key : string;
  3. private_key : string option;
  4. project_id : int;
}
val compare_t' : t' -> t' -> int
val sexp_of_t' : t' -> Ppx_sexp_conv_lib.Sexp.t
type t = t' option
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val make : uri:Uri.t -> public_key:string -> ?private_key:string -> project_id:int -> unit -> t
val default : t

default is the DSN determined from SENTRY_DSN in the environment (or None if it's not set or invalid)

val of_string : string -> t

of_string dsn parses the given DSN and returns the resulting Sentry config. You should generally not use this function directly and should use Sentry.context (or Sentry.async_context), which looks up the DSN for you from the environment.

The DSN should look like '{PROTOCOL}://{PUBLIC_KEY}:{PRIVATE_KEY}@{HOST}/{PATH}{PROJECT_ID}'

All values except for PRIVATE_KEY are required. PROJECT_ID must be an integer. In general you should get this value from Sentry and should not construct it yourself.

Returns None if the DSN is invalid.

See docs: https://docs.sentry.io/quickstart/#about-the-dsn

val of_uri : Uri.t -> t

of_uri dsn is like of_string dsn but takes a Uri.t

val arg : t Core.Command.Arg_type.t

arg is a Command.Spec argument type which calls of_string

val arg_exn : t Core.Command.Arg_type.t

Like arg but uses of_string_exn

val event_store_uri : t' -> Uri.t

event_store_uri is the URI we should POST Sentry events to

OCaml

Innovation. Community. Security.