Expand description
Logging, crash reporting and anonymous action telemetry for RPFM.
This crate bundles three related concerns that share the same Sentry lifecycle:
- Structured logging: re-exports
log’sinfo!/warn!/error!macros so every crate can emit log lines without pulling Sentry. - Crash reporting:
Logger::initinstalls panic hooks, writes local crash reports and wires up Sentry for release builds. - Action telemetry: a lightweight action counter that aggregates anonymous usage data and ships it to Sentry on graceful shutdown.
Libraries (rpfm_lib, rpfm_extensions, rpfm_ui_common, …) depend
only on the plain log crate. The executables (rpfm_ui, rpfm_server)
depend on this crate to wire up the full stack.
Re-exports§
pub use sentry;
Modules§
- debugid
- Represents a debug ID.
- map
- The internally used arbitrary data map type.
- value
- An arbitrary (JSON) value.
Macros§
- debug
- Logs a message at the debug level.
- error
- Logs a message at the error level.
- info
- Logs a message at the info level.
- release_
name - Returns the intended release for Sentry as an
Option<Cow<'static, str>>. - trace
- Logs a message at the trace level.
- warn
- Logs a message at the warn level.
Structs§
- Addr
- Represents an address.
- AppContext
- Holds app information.
- Apple
Debug Image - Represents an apple debug image in the debug meta.
- Attachment
- Represents an attachment item.
- Breadcrumb
- Represents a single breadcrumb.
- Browser
Context - Holds information about the web browser.
- CError
- POSIX signal with optional extended data.
- Client
Init Guard - Helper struct that is returned from
init. - Client
Options - Configuration settings for the client.
- Client
SdkInfo - Information on the SDK client.
- Client
SdkPackage - Represents an installed package relevant to the SDK.
- Crontab
Parse Error - Error type for errors with parsing a crontab schedule
- Debug
Meta - Represents debug meta information.
- Device
Context - Holds device information.
- Dynamic
Sampling Context - The Dynamic Sampling Context.
- Envelope
- A Sentry Envelope.
- Envelope
Headers - The supported Sentry Envelope Headers.
- Envelope
Item Iter - An Iterator over the items of an Envelope.
- Event
- Represents a full event for Sentry.
- Exception
- Represents a single exception.
- Frame
- Represents a frame.
- GpuContext
- GPU context describes the GPU of the device.
- Log
- A single structured log.
- LogAttribute
- An attribute that can be attached to a log.
- LogEntry
- Represents a log entry message.
- LogSeverity
Number - A number indicating the severity of a log, according to the OpenTelemetry
SeverityNumberspec. - Logger
- Crash report data structure.
- Mach
Exception - Mach exception information.
- Map
- An ordered map based on a B-Tree.
- Mechanism
- Represents a single exception.
- Mechanism
Meta - Operating system or runtime meta information to an exception mechanism.
- Monitor
Check In - The monitor check-in payload.
- Monitor
Config - The monitor configuration playload for upserting monitors during check-in
- Organization
Id - An ID that identifies an organization in the Sentry backend.
- OsContext
- Holds operating system information.
- Otel
Context - OpenTelemetry context
- Parse
Level Error - An error used when parsing
Level. - Parse
Session Status Error - An error used when parsing
SessionStatus. - Parse
Status Error - An error used when parsing
SpanStatus. - Posix
Signal - POSIX signal with optional extended data.
- Proguard
Debug Image - Represents a proguard mapping file reference.
- RegVal
- Represents a register value.
- Request
- Represents http request data.
- Response
Context - Holds information about an HTTP response.
- Runtime
Context - Holds information about the runtime.
- Sample
Rand - A random number generated at the start of a trace by the head of trace SDK.
- Sentry
Layer - Provides a tracing layer that dispatches events to sentry
- Sentry
Logger - Provides a dispatching logger.
- Session
Aggregate Item - An aggregation grouped by
startedanddistinct_id. - Session
Aggregates - An Aggregation of Release Health Sessions
- Session
Attributes - Additional attributes for Sessions.
- Session
Update - A Release Health Session.
- Span
- Represents a tracing span.
- SpanId
- Holds the identifier for a Span
- Stacktrace
- Represents a stacktrace.
- Symbolic
Debug Image - Represents a symbolic debug image.
- System
SdkInfo - Holds information about the system SDK.
- Template
Info - Represents template debug info.
- Thread
- Represents a single thread.
- Trace
Context - Holds information about a tracing event.
- TraceId
- Holds the identifier for a Trace
- Transaction
- Represents a tracing transaction.
- Url
- A parsed URL record.
- User
- Represents user info.
- Uuid
- A Universally Unique Identifier (UUID).
- Values
- A wrapper type for collections with attached meta data.
- Wasm
Debug Image - Represents a WebAssembly debug image.
Enums§
- Attachment
Type - The different types an attachment can have.
- Context
- Typed contextual data.
- Debug
Image - Represents a debug image.
- Envelope
Error - Raised if a envelope cannot be parsed from a given input.
- Envelope
Item - An Envelope Item.
- Invalid
Sample Rand Error - An error that indicates failure to construct a SampleRand.
- IpAddress
- An IP address, either IPv4, IPv6 or Auto.
- Item
Container - A container for a list of multiple items.
It’s considered a single envelope item, with its
typecorresponding to the contained items’type. - Level
- Represents the level of severity of an event or breadcrumb.
- LogError
- Error type for the logging crate.
- LogLevel
- Indicates the severity of a log, according to the
OpenTelemetry
SeverityTextspec. - Monitor
Check InStatus - Represents the status of the monitor check-in
- Monitor
Interval Unit - The unit for the interval schedule type
- Monitor
Schedule - Configuration object of the monitor schedule.
- Orientation
- Optional device screen orientation
- Session
Mode - The Session Mode of the SDK.
- Session
Status - The Status of a Release Health Session.
- Span
Status - The status of a Span.
- Thread
Id - Represents a thread id.
- Value
- Represents any valid JSON value.
Statics§
- SENTRY_
DSN - Sentry DSN (Data Source Name) for error reporting.
Functions§
- end_
session - End the current Release Health Session.
- end_
session_ with_ status - End the current Release Health Session with the given
SessionStatus. - flush
- Sends accumulated action telemetry to Sentry and clears the counters.
- is_
crash_ reports_ enabled - Returns the current crash-reports enabled state.
- is_
usage_ telemetry_ enabled - Returns the current usage-telemetry enabled state.
- record_
action - Records a single action occurrence without emitting a log line.
- send_
user_ feedback - Captures a single user-feedback message and ships it to Sentry.
- set_
crash_ reports_ enabled - Enables or disables automatic Sentry crash-report uploads.
- set_
usage_ telemetry_ enabled - Enables or disables usage-telemetry counter updates.
- track_
action - Records a single action occurrence.
Type Aliases§
- Result
- Result type for the logging crate.