Skip to content

Delay dynamic sampling when metrics extraction fails #6191

Description

@jjbayer

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:

  1. Return a Result from metrics extraction and rewrite the sampling decision to "keep" with sampling rate None if the result is an error.
  2. 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:

  • Write an integration test that validates behavior.
  • Fix the code.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions