Skip to main content

Module sentry

Module sentry 

Source
Expand description

Integration with sentry.io for event reporting.

ModulesΒ§

metrics_adapter πŸ”’
Sends the batches of the SentryPolicy through 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 end drops 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 path is 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 attrs into log.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 None if init has 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 None if init has 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.