Skip to main content

Crate relay_dynamic_config

Crate relay_dynamic_config 

Source
Expand description

Protocol for dynamic configuration passed down to Relay from Sentry.

In contrast to static configuration files, parts of Relay’s configuration is generated by Sentry and polled by Relay in regular intervals. Dynamic configuration includes (but is not limited to)

  1. rate limits and quotas,
  2. feature flags,
  3. settings that the user configured in Sentry’s UI.

§Project Configuration

So far, the only scope of dynamic configuration is per relay_auth::PublicKey a.k.a. DSN. The schema for this configuration is defined in ProjectConfig.

§Example Config

{
    "organizationId": 1,
    "config": {
        "excludeFields": [],
        "filterSettings": {},
        "scrubIpAddresses": False,
        "sensitiveFields": [],
        "scrubDefaults": True,
        "scrubData": True,
        "groupingConfig": {
            "id": "legacy:2019-03-12",
            "enhancements": "eJybzDhxY05qemJypZWRgaGlroGxrqHRBABbEwcC",
        },
        "blacklistedIps": ["127.43.33.22"],
        "trustedRelays": [],
    },
}

§Global configuration

This is the configuration for all Relays, independently from what per-project configuration is, and is defined in GlobalConfig.

§Example Config

{
    "measurements": {
       "builtinMeasurements": [
           {
               "name": "app_start_cold",
               "unit": "millisecond"
           }
       ],
       "maxCustomMeasurements": 1
    }
}

Structs§

BucketEncodings
Configuration container to control BucketEncoding per namespace.
CustomMeasurementConfig
Configuration for extracting custom measurements from transaction payloads.
FeatureSet
A set of Features.
GlobalConfig
A dynamic configuration for all Relays passed down from Sentry.
LimitedProjectConfig
Subset of ProjectConfig that is passed to external Relays.
Options
All options passed down from Sentry to Relay.
ProjectConfig
Dynamic, per-DSN configuration passed down from Sentry.
RetentionConfig
Per-Category settings for retention policy.
RetentionsConfig
Settings for retention policy.
SessionMetricsConfig
Configuration for metric extraction from sessions.
TrimmingConfig
Per-category settings for item trimming.
TrimmingConfigs
Settings for item trimming.
TrustedRelayConfig
Configuration to control communication from trusted relays.

Enums§

BucketEncoding
All supported metric bucket encodings.
ErrorBoundary
Wraps a serialization / deserialization result to prevent error from bubbling up.
Feature
Features exposed by project config.
SignatureVerification
Types of verification that can be performed on the signature.

Constants§

GRADUATED_FEATURE_FLAGS
Feature flags of graduated features are no longer sent by sentry, but Relay needs to insert them for outdated downstream Relays that may still rely on the feature flag.