Commits
Tarun Sukhani authored 86112e78c23
feat: OTLP push exporter for metrics via micrometer-registry-otlp (PF-82) Layers an optional OtlpMeterRegistry alongside the existing Prometheus pull endpoint introduced in PF-13. When metrics.otlp.endpoint is set, MetricsPlugin wraps both registries in a CompositeMeterRegistry and installs the composite via Metrics.install(). Custom meters and JVM binders register on the composite once and propagate to both backends; the /@metrics scrape continues to read from the Prometheus registry directly. When the endpoint is unset, behavior is unchanged from PF-13: the Prometheus registry is installed standalone. Configuration keys (all under metrics.otlp.*): - endpoint: empty disables OTLP; otherwise the OTLP/HTTP collector URL - step: push interval; accepts 60s/1m/PT60S short forms with a 60s fallback on parse failure - headers: K=V,K=V list of HTTP headers (auth, routing) - resourceAttributes: K=V,K=V OTLP resource attributes Adds micrometer-registry-otlp 1.13.6 plus its required runtime transitives (opentelemetry-proto 1.2.0-alpha, protobuf-java 3.23.4). The Prometheus side already ships its own shaded protobuf, so the unshaded one declared here is OTLP-only and cannot collide. Tests in MetricsPluginOtlpTest cover: endpoint-empty stays Prometheus-only, endpoint-set installs a composite with both registries, custom meters reach both backends, KV-list parsing for headers and resource attributes, short-form and malformed step parsing, and onApplicationStop closes both component registries. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>