opentelemetry-java-contrib/micrometer-meter-provider
dependabot[bot] 194631815d
Bump micrometer-registry-prometheus from 1.9.5 to 1.10.0 (#575)
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 &quot;get[Low|High]CardinalityKeyValue()&quot; on
&quot;Observation.Context&quot; <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 &quot;createNotStarted&quot; 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="5c41afef8d"><code>5c41afe</code></a>
Upgrade to context-propagation 1.0.0</li>
<li><a
href="0d98aba3b8"><code>0d98aba</code></a>
Migrate tests from TagsTest to KeyValuesTest (<a
href="https://github-redirect.dependabot.com/micrometer-metrics/micrometer/issues/3525">#3525</a>)</li>
<li><a
href="e34b93e0a2"><code>e34b93e</code></a>
Merge branch '1.9.x'</li>
<li><a
href="01c8576c16"><code>01c8576</code></a>
Upgrade Spring Boot to 2.7.5</li>
<li><a
href="dfa1ffca09"><code>dfa1ffc</code></a>
Merge branch '1.8.x' into 1.9.x</li>
<li><a
href="266cd4e84c"><code>266cd4e</code></a>
Upgrade Spring Boot to 2.6.13</li>
<li><a
href="6eba9e7d06"><code>6eba9e7</code></a>
Upgrade Google Cloud Monitoring to 3.6.0</li>
<li><a
href="87c9164e78"><code>87c9164</code></a>
Merge branch '1.9.x'</li>
<li><a
href="31e906e288"><code>31e906e</code></a>
Upgrade Spring Cloud to 3.1.5</li>
<li><a
href="70d5eff93b"><code>70d5eff</code></a>
Upgrade Google Cloud Monitoring to 3.2.10</li>
<li>Additional commits viewable in <a
href="https://github.com/micrometer-metrics/micrometer/compare/v1.9.5...v1.10.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=io.micrometer:micrometer-registry-prometheus&package-manager=gradle&previous-version=1.9.5&new-version=1.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-08 14:09:29 +01:00
..
src Update errorprone (#490) 2022-09-29 16:42:29 -07:00
README.md MeterProvider that delegates to Micrometer MeterRegistry (#328) 2022-05-24 14:18:58 -07:00
build.gradle.kts Bump micrometer-registry-prometheus from 1.9.5 to 1.10.0 (#575) 2022-11-08 14:09:29 +01:00

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

Learn more about component owners in component_owners.yml.