We should not perform any dynamic sampling when metrics extraction fails for any reason (e.g. invalid config, outdated version), unless we are in a processing relay, which is the last possible hop that can perform dynamic sampling.
This can be done in two ways:
- Return a
Result from metrics extraction and rewrite the sampling decision to "keep" with sampling rate None if the result is an error.
- Validate the metrics config before computing the sampling decision, and pass an infallible version of the config into the metrics extraction function, as described in
|
// TODO(follow-up): this function should always extract metrics. Dynamic sampling should validate |
|
// the full metrics extraction config and skip sampling if it is incomplete. |
TODO:
We should not perform any dynamic sampling when metrics extraction fails for any reason (e.g. invalid config, outdated version), unless we are in a processing relay, which is the last possible hop that can perform dynamic sampling.
This can be done in two ways:
Resultfrom metrics extraction and rewrite the sampling decision to "keep" with sampling rateNoneif the result is an error.relay/relay-server/src/processing/transactions/extraction.rs
Lines 54 to 55 in 648cc5b
TODO: