Follow-up to #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.