Bumps [micrometer-registry-prometheus](https://github.com/micrometer-metrics/micrometer) from 1.9.5 to 1.10.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/micrometer-metrics/micrometer/releases">micrometer-registry-prometheus's releases</a>.</em></p> <blockquote> <h2>1.10.0</h2> <p>Micrometer 1.10.0 is the GA version of a new feature release. See our <a href="https://micrometer.io/docs/support">support policy</a> for support timelines. Below are the combined release notes of all the pre-release milestones and release candidate preceding it.</p> <h2>⚠️ Noteworthy</h2> <ul> <li>Check out the new <a href="https://micrometer.io/docs/observation">Observation API</a> (see the <a href="https://github.com/micrometer-metrics/micrometer/wiki/Migrating-to-new-1.10.0-Observation-API">Migration Guide</a>)</li> <li>If you are upgrading from one of the pre-release versions, check the <a href="https://github.com/micrometer-metrics/micrometer/wiki/1.10-Migration-Guide">1.10 Migration Guide</a></li> <li><code>ReactorNettySender</code> has been removed <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/issues/2802">#2802</a></li> </ul> <h2>⭐ New Features / Enhancements</h2> <ul> <li>Add gRPC authority info to the observation context <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3510">#3510</a></li> <li>Add "get[Low|High]CardinalityKeyValue()" on "Observation.Context" <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3505">#3505</a></li> <li>Verify sender propagation for HTTP client instrumentation <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3504">#3504</a></li> <li>Add support for creating KeyValues from any iterable <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3503">#3503</a></li> <li>Added remoteServiceAddress for Sender / Receiver contexts <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3500">#3500</a></li> <li>Provide a default for missing values in KeyValue <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/issues/3458">#3458</a></li> <li>Allow documenting optional keys <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3454">#3454</a></li> <li>Add wrap functionality to the Observation <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3433">#3433</a></li> <li>Add Observation instrumentation for gRPC client and server <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3427">#3427</a></li> <li>Add TestObservationRegistryAssert assertion for observation count <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/issues/3426">#3426</a></li> <li>Make observation return its context and immutable access to parent <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3423">#3423</a></li> <li>ReceiverContext was missing a remoteServiceName <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3419">#3419</a></li> <li>Handle IO_ERROR for Apache HTTP client with observation API <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3418">#3418</a></li> <li>Tck with observations <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3410">#3410</a></li> <li>Set size and characteristics for Spliterator used with Tags and KeyValues <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3409">#3409</a></li> <li>Test against ObservationDocumentation in instrumentation TCK <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3372">#3372</a></li> <li>Add benchmarks for the Observation API <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/issues/3370">#3370</a></li> <li>Support for Jetty 11 <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/issues/3234">#3234</a></li> <li>Add "createNotStarted" method that lazily creates context <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3401">#3401</a></li> <li>Context allows modification of KeyValues <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3383">#3383</a></li> <li>Cloudwatch max batchSize was increased from 20 to 1000 <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/issues/3376">#3376</a></li> <li>Events in DocumentedObservation <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3367">#3367</a></li> <li>signalfx: remove unnecessary allocation if the distribution summary does not have histogram <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3364">#3364</a></li> <li>Remote service name for sender context <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3363">#3363</a></li> <li>Common ResponseContext interface for interacting with the response <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3362">#3362</a></li> <li>JDK11 HttpClient instrumentation <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3358">#3358</a></li> <li>Abstraction for instrumentating with a Timer or Observation (optionally) <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3357">#3357</a></li> <li>[signalfxregistry]: Add option to send delta histogram count buckets. <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3350">#3350</a></li> <li>Apache HTTP client instrumentation with Observation <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3312">#3312</a></li> <li>Generify throwable in CheckedCallable/CheckedRunnable <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3326">#3326</a></li> <li>Scoped checked actions <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3323">#3323</a></li> <li>ObservationContextAssert now asserts ContextView, add parentObservation assertions <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3304">#3304</a></li> <li>Add ObservationRegistry hasRemainingCurrentScope and similar assertions <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3303">#3303</a></li> <li>Add getContextualName(Context c) on Observation.Convention <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3301">#3301</a></li> <li>Receiver and SenderContext <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3293">#3293</a></li> <li>Added option to set a parent Observation on an existing Observation <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3291">#3291</a></li> <li>Introduces GlobalObservationConvention <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3285">#3285</a></li> <li>Declare HdrHistogram as a runtime dependency <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/pull/3263">#3263</a></li> <li>Observe instantaneous events <a href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/issues/3100">#3100</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|---|---|---|
| .. | ||
| src | ||
| README.md | ||
| build.gradle.kts | ||
README.md
Micrometer MeterProvider
This utility provides an implementation of MeterProvider which wraps a Micrometer MeterRegistry
and delegates the reporting of all metrics through Micrometer. This enables projects which already
rely on Micrometer and cannot currently migrate to OpenTelemetry Metrics to be able to report on
metrics that are reported through the OpenTelemetry Metrics API.
Usage
Create the MicrometerMeterProvider passing an existing instance of MeterRegistry. Then you can
use the OpenTelemetry Metrics MeterProvider API to create instruments.
MeterRegistry meterRegistry = ...;
// create the meter provider
MeterProvider meterProvider = MicrometerMeterProvider.builder(meterRegistry)
.build();
Meter meter = meterProvider.get("my-app");
// create an instrument
LongCounter counter = meter.counterBuilder("my.counter")
.build();
// record metrics
count.add(1, Attributes.of(AttributeKey.stringKey("key"), "value"));
Note: Instruments in OpenTelemetry are created without tags, which are reported with each
measurement. But tags are required to create Micrometer metrics. Because of this difference the
adapter must listen for when measurements are being read by the MeterRegistry in order to call
callbacks registered for observable metrics in order to create the Micrometer meters on demand.
By default the MicrometerMeterProvider will create a dummy Metric with the name
"otel-polling-meter" which will be used to poll the asynchronous OpenTelemetry instruments as it
is measured. However, you can also specify an alternative CallbackRegistrar strategy.
MeterRegistry meterRegistry = ...;
// create the meter provider
MeterProvider meterProvider = MicrometerMeterProvider.builder(meterRegistry)
.setCallbackRegistrar(ScheduledCallbackRegistrar.builder()
.setPeriod(Duration.ofSeconds(10L))
.build())
.build();
Meter meter = meterProvider.get("my-app");
// create an asynchronous instrument
ObservableDoubleGauge gauge = meter.gaugeBuilder("my.gauge")
.buildWithCallback(measurement -> {
// record metrics
measurement.record(queue.size(), Attributes.of(AttributeKey.stringKey("key"), "value"));
});
Component owners
- Justin Spindler, Comcast
Learn more about component owners in component_owners.yml.