relay icon indicating copy to clipboard operation
relay copied to clipboard

If metrics extraction fails, dynamic sampling should also fail

Open jjbayer opened this issue 1 month ago • 1 comments

Follow-up to https://github.com/getsentry/relay/pull/5379: We currently perform some checks on the metrics extraction config before running dynamic sampling. However, it is still possible to run dynamic sampling and then fail metrics extraction, because metrics extraction has stricter requirements on the config (e.g. generic metrics extraction config).

Instead of checking the config twice, do all the checks in run_dynamic_sampling and pass the resulting config to extract_metrics as a struct. This way, the two checks cannot go out of sync.

jjbayer avatar Nov 24 '25 06:11 jjbayer

RELAY-180

linear[bot] avatar Nov 24 '25 06:11 linear[bot]