Expand description
Integration with sentry.io for event reporting.
ModulesΒ§
- metrics_
adapter π - Sends the batches of the
SentryPolicythrough the Sentry SDK.
StructsΒ§
- Metadata π
- Environment and CI metadata attached to all Sentry events.
ConstantsΒ§
- SESSION_
ROTATION_ πINTERVAL - How long one release health session lasts before it is ended and replaced.
StaticsΒ§
- CLIENT_
GUARD π - Keeps the Sentry client open until
enddrops it. - SESSION π
- The release health session in progress.
- SESSION_
ERRORS π - Errors reported from any thread since the session in progress started.
FunctionsΒ§
- add_
chain_ πtags - Adds the chain position to
event, keeping any tags the event already has. - add_
metric_ πattributes - Adds the network, the network upgrade at the tip, whether the node is near the tip, and the process uptime to a metricβs attributes, keeping any the metric already has.
- chain_
log_ πattributes - Returns the chain position as log attributes, with the height as a number so that log queries can aggregate it.
- context_
map π - end π
- Ends the release health session with
status, sends the metrics that are due without waiting between envelopes, then closes the client. - end_
session π - Ends the session in progress with
status, reports it, and returns it. - env_var π
- init π
- Starts the Sentry client and its release health sessions, which are replaced daily.
- insert_
lookup_ πvalues - is_
client_ πenabled - is_
zebra_ πsource - Returns whether
pathis a source file in one of Zebraβs crates. - lock_
session π - lookup_
value π - mark_
zebra_ πframes_ in_ app - Marks the stack frames from Zebraβs crates as in-app, and every other frame as not in-app.
- merge_
log_ πattributes - Merge
attrsintolog.attributes, letting existing keys win. - metrics_
recorder π - Returns the recorder that sends every metric to Sentry, starting the thread that flushes it on
the first call. Returns
Noneifinithas not bound an enabled client, or if that thread canβt start. - panic_
event_ πfrom - Builds the Sentry event for a panic.
- release_
name π - release_
name_ πfrom - rotate_
session π - Ends the session in progress as exited and starts the next session of the same run.
- send_
session π - send_
tip_ πblock_ delay - Sends a tip block delay to Sentry with the blockβs height, so that nodes can be compared block by block.
- slugged_
git_ πref - start_
run_ πsessions - Starts the first release health session of this run.
- start_
session π - Starts a release health session and reports that it started.
- tip_
block_ πdelay - Returns a tip block delay with the blockβs height and, once the network is known, its network upgrade.
- tracing_
layer π - Returns the Sentry tracing layer, or
Noneifinithas not bound an enabled client. - without_
panic_ πhandling_ frames - Removes the frames that handle the panic: the standard libraryβs panic machinery and the panic hook that builds the event.