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)
- rate limits and quotas,
- feature flags,
- 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§
- Bucket
Encodings - Configuration container to control
BucketEncoding
per namespace. - Combined
Metric Extraction Config - Combined view of global and project-specific metrics extraction configs.
- Custom
Measurement Config - Configuration for extracting custom measurements from transaction payloads.
- Feature
Set - A set of
Feature
s. - Global
Config - A dynamic configuration for all Relays passed down from Sentry.
- Limited
Project Config - Subset of
ProjectConfig
that is passed to external Relays. - Metric
Extraction Config - Configuration for generic extraction of metrics from all data categories.
- Metric
Extraction Group - Group of metrics & tags that can be enabled or disabled as a group.
- Metric
Extraction Group Override - Configures global metrics extraction groups.
- Metric
Extraction Groups - Global groups for metric extraction.
- Metric
Spec - Specification for a metric to extract from some data.
- Metrics
- Configuration for metrics filtering.
- Options
- All options passed down from Sentry to Relay.
- Project
Config - Dynamic, per-DSN configuration passed down from Sentry.
- Session
Metrics Config - Configuration for metric extraction from sessions.
- Tag
- Builder for
TagSpec
. - TagBlock
- Configuration for removing tags matching the
tag
pattern on metrics whose name matches thename
pattern. - TagMapping
- Mapping between extracted metrics and additional tags to extract.
- TagSpec
- Configuration for a tag to add to a metric.
- TagWith
Source - Intermediate result of the tag spec builder.
- Tagging
Rule - Rule defining when a target tag should be set on a metric.
- Transaction
Metrics Config - Configuration for extracting metrics from transaction payloads.
Enums§
- Accept
Transaction Names - Deprecated. Defines whether URL transactions should be considered low cardinality.
- Bucket
Encoding - All supported metric bucket encodings.
- Cardinality
Limiter Mode - Kill switch for controlling the cardinality limiter.
- Error
Boundary - Wraps a serialization / deserialization result to prevent error from bubbling up.
- Feature
- Features exposed by project config.
- Group
Key - Enumeration of keys in
MetricExtractionGroups
. In JSON, this is simply a string. - TagSource
- Specifies how to obtain the value of a tag in
TagSpec
.
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.
Functions§
- convert_
conditional_ tagging - Converts the given tagging rules from
conditional_tagging
to the newer metric extraction config. - normalize_
json - Normalizes the given value by deserializing it and serializing it back.