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§

Enums§

Constants§

  • 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.

Functions§

  • Converts the given tagging rules from conditional_tagging to the newer metric extraction config.
  • Normalizes the given value by deserializing it and serializing it back.