Skip to content

Commit 2f7852d

Browse files
committed
add MeterProvider creation from declarative config
Implements create_meter_provider() and configure_meter_provider() following the same patterns as _tracer_provider.py. - PeriodicExportingMetricReader with explicit interval/timeout defaults (60s/30s) to suppress env var reading - OTLP HTTP and gRPC metric exporters (lazy imports) - Console metric exporter - Temporality preference mapping (cumulative/delta/low_memory) with explicit dicts to suppress OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - Default histogram aggregation mapping with env var suppression - View creation with selector (instrument type/name/unit/meter info) and stream (name/description/aggregation/attribute_keys) - ExemplarFilter mapping; default = TraceBasedExemplarFilter (spec default) - configure_meter_provider(None) is a no-op per spec/Java/JS behavior - attribute_keys.excluded logs a warning (SDK View only supports inclusion) - Pull readers raise ConfigurationError (marked _development in spec) Assisted-by: Claude Sonnet 4.6
1 parent 103ff08 commit 2f7852d

3 files changed

Lines changed: 1177 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)