Skip to main content

Crate sentry_options

Crate sentry_options 

Source
Expand description

Options client for reading validated configuration values.

Re-exports§

pub use features::FeatureChecker;
pub use features::FeatureContext;
pub use features::FeatureError;
pub use features::features;

Modules§

features
Feature flag evaluation.
testing
Testing utilities for overriding option values in tests.

Structs§

InitBuilder
Builder for initializing the global options store. Define optional parameters with with_* methods, then finalize with init()
NamespaceOptions
Handle for accessing options within a specific namespace.
Options
Options store for reading configuration values.
SchemaRegistry
Registry for loading and storing schemas

Enums§

OptionsError
ValidationError
Errors that can occur during schema and value validation

Constants§

DEFAULT_REFRESH_THRESHOLD
Default minimum age of a cached values snapshot before a read triggers a refresh. A per-thread jitter of up to 1 s is added on top to spread the reload across threads.

Functions§

feature_property
The value a namespace schema pairs with each feature.<name> key, i.e. {"$ref": "#/definitions/Feature"}. Splice this in when assembling a schema in memory rather than hand-rolling the ref the meta-schema requires.
init
Initialize global options using the fallback chain: SENTRY_OPTIONS_DIR env var, then /etc/sentry-options if it exists, otherwise sentry-options/.
init_with_propagation_callbackDeprecated
Like init, but with a callback that fires whenever values are refreshed from disk with a new generated_at timestamp. The callback receives (namespace, delay_secs).
init_with_schemasDeprecated
Initialize global options with schemas provided as in-memory JSON strings. Values are loaded from disk using the standard fallback chain.
options
Get a namespace handle for accessing options.

Type Aliases§

PropagationCallback
Callback invoked when a namespace’s values are updated. Receives (namespace, delay_secs) — the propagation delay from ConfigMap generation to the app reading the new values.
Result