Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
A context is a set of tags and breadcrumbs attached to an event https://docs.sentry.io/clientdev/context/
Note that contexts are mutable to make it easier to add tags and breadcrumbs.
type t = {
mutable environment : string option;
mutable release : string option;
mutable server_name : string option;
extra : Yojson.Basic.json Core_kernel.String.Table.t;
modules : string Core_kernel.String.Table.t;
}
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val default : ?max_breadcrumbs:int -> unit -> t
Returns a new context with default data from the environment and system calls.
val empty : ?max_breadcrumbs:int -> unit -> t
Returns a new context with no tags or breadcrumbs. You probably want to use default ()
or copying the parent context in most cases.
val merge_tags : (string * string) list -> t -> unit
merge_tags tags t
merges the given tags into t
val merge_extra : (string * Yojson.Basic.json) list -> t -> unit
merge_extra extra t
merges the given extra data into t
val merge_modules : (string * string) list -> t -> unit
merge_modules modules t
merges the given module info into t
val add_breadcrumb : Breadcrumb.t -> t -> unit
Add a breadcrumb to the context and remove older breadcrumbs