Skip to content

Commit

Permalink
ref(ourlogs): Add option to control breadcrumb extraction (#84212)
Browse files Browse the repository at this point in the history
### Summary
To avoid rollout issues when turning on s4s and other environments for
the first time, this option will control the rate at which logs are
extracted from breadcrumbs.
  • Loading branch information
k-fish authored and andrewshie-sentry committed Feb 5, 2025
1 parent a15e06d commit 6fafa8b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/sentry/options/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,15 @@
flags=FLAG_ALLOW_EMPTY | FLAG_PRIORITIZE_DISK | FLAG_AUTOMATOR_MODIFIABLE,
)

# Extract logs from breadcrumbs only for a random fraction of sent breadcrumbs.
#
# NOTE: Any value below 1.0 will break the product. Do not override in production.
register(
"relay.ourlogs-breadcrumb-extraction.sample-rate",
default=0.0,
flags=FLAG_AUTOMATOR_MODIFIABLE,
)


# Extract spans only from a random fraction of transactions.
#
Expand Down
1 change: 1 addition & 0 deletions src/sentry/relay/globalconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"relay.metric-bucket-set-encodings",
"relay.metric-bucket-distribution-encodings",
"relay.metric-stats.rollout-rate",
"relay.ourlogs-breadcrumb-extraction.sample-rate",
"relay.span-extraction.sample-rate",
"relay.span-normalization.allowed_hosts",
"relay.drop-transaction-attachments",
Expand Down

0 comments on commit 6fafa8b

Please sign in to comment.