feat(config): add pull metric reader support to declarative config (#5216)
* add pull metric reader support to declarative config Implements PullMetricReader and PullMetricExporter support in declarative file configuration: - _create_prometheus_metric_reader() — dynamically imports PrometheusMetricReader, maps config fields (host, port, without_target_info_development), and starts HTTP server - _create_pull_metric_exporter() — dispatches to prometheus or loads plugin readers via opentelemetry_pull_metric_exporter entry point group - _create_pull_metric_reader() — handles producers (warns, #5074) and cardinality_limits (warns), delegates to exporter factory producers and cardinality_limits log warnings as not yet supported. Assisted-by: Claude Opus 4.6 * rename changelog fragment to PR #5216 * fix pylint R1726: simplify boolean condition Remove redundant 'or False' from bool() conversion. Assisted-by: Claude Opus 4.6 * fix pylint R6301: use self in prometheus test methods Add provider assertions so test methods use self, satisfying pylint's no-self-use check. Assisted-by: Claude Opus 4.6 * address review: add type annotation, validate entry point group in test - Add PrometheusMetricExporterConfig type annotation to _create_prometheus_metric_reader config parameter - Assert entry_points is called with the correct group name (opentelemetry_pull_metric_exporter) in plugin loading test Assisted-by: Claude Opus 4.6 * split pull metric reader tests into separate class to fix pylint R0904 * fix test class split: move push exporter tests to separate class The merge brought in push exporter plugin tests from #5128 which ended up in TestCreatePullMetricReaders. Moved them to a new TestCreateMetricReadersGeneral class with the _make_periodic_config helper they need. Assisted-by: Claude Opus 4.6 --------- Co-authored-by: Lukas Hering <40302054+herin049@users.noreply.github.com>
M
Mike Goldsmith committed
6cab5dcd6633fd06342093849b14f0af6d1269e2
Parent: 1731583
Committed by GitHub <noreply@github.com>
on 5/19/2026, 4:05:35 PM