An application metrics facade for the most popular monitoring tools. Think SLF4J, but for metrics.

Overview

Micrometer Application Metrics

Build Status Apache 2.0 Maven Central Javadocs

An application metrics facade for the most popular monitoring tools. Instrument your code with dimensional metrics with a vendor neutral interface and decide on the monitoring backend at the last minute.

More info and the user manual are available on micrometer.io.

Micrometer is the instrumentation library underpinning Spring Boot 2.0's metrics collection.

Long-term support versions

See Micrometer's support policy for more details about long-term support (LTS) versus non-LTS versions.

Minor version line LTS Final patch
1.0.x Yes 1.0.11
1.1.x Yes 1.1.19
1.2.x No 1.2.2
1.3.x Yes
1.4.x No 1.4.2
1.5.x Yes
1.6.x Yes

Join the discussion

Join the Micrometer Slack to share your questions, concerns, and feature requests.

Snapshot builds

Snapshots are published to repo.spring.io for every successful build on the master branch and maintenance branches.

To use:

repositories {
    maven { url 'https://repo.spring.io/libs-snapshot' }
}

dependencies {
    implementation 'io.micrometer:micrometer-core:latest.integration'
}

Documentation

The reference documentation is managed in a separate GitHub repository and published to https://micrometer.io/.

Contributing

See our Contributing Guide for information about contributing to Micrometer.


Licensed under Apache Software License 2.0

Sponsored by VMware

Comments
  • Export Spring Boot Health Check Information

    Export Spring Boot Health Check Information

    I want to export health information provided by Spring Boot's health endpoint (/health) to Prometheus. Is there an easy (standard) way to do this with micrometer?

    spring-boot change 
    opened by ghost 29
  • `Collector already registered that provides name: executor_completed_tasks_total` when using `ExecutorServiceMetrics`

    `Collector already registered that provides name: executor_completed_tasks_total` when using `ExecutorServiceMetrics`

    Hi thanks for the lib! I am facing a problem: I have several ExecutorServices, and want to monitor their metrics. I use code like the following:

            scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(config.getBackForthScheduledThreadPoolCoreSize());
            scheduledThreadPoolExecutor.setRemoveOnCancelPolicy(true);
    
            new ExecutorServiceMetrics(scheduledThreadPoolExecutor, "ws.back.forth.executor", null)
                    .bindTo(meterRegistry);
    
    // ... have multiple executors, thus have multiple `new ExecutorServiceMetrics`
    

    However, it throws the following error:

    ...
    Caused by: java.lang.IllegalArgumentException: Collector already registered that provides name: executor_completed_tasks_total
    	at io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:54)
    	at io.prometheus.client.Collector.register(Collector.java:139)
    	at io.micrometer.prometheus.PrometheusMeterRegistry.lambda$applyToCollector$16(PrometheusMeterRegistry.java:410)
    	at java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1955)
    	at io.micrometer.prometheus.PrometheusMeterRegistry.applyToCollector(PrometheusMeterRegistry.java:406)
    	at io.micrometer.prometheus.PrometheusMeterRegistry.newFunctionCounter(PrometheusMeterRegistry.java:240)
    	at io.micrometer.core.instrument.MeterRegistry$More.lambda$counter$1(MeterRegistry.java:920)
    	at io.micrometer.core.instrument.MeterRegistry.lambda$registerMeterIfNecessary$5(MeterRegistry.java:561)
    	at io.micrometer.core.instrument.MeterRegistry.getOrCreateMeter(MeterRegistry.java:614)
    	at io.micrometer.core.instrument.MeterRegistry.registerMeterIfNecessary(MeterRegistry.java:568)
    	at io.micrometer.core.instrument.MeterRegistry.registerMeterIfNecessary(MeterRegistry.java:561)
    	at io.micrometer.core.instrument.MeterRegistry.access$700(MeterRegistry.java:77)
    	at io.micrometer.core.instrument.MeterRegistry$More.counter(MeterRegistry.java:920)
    	at io.micrometer.core.instrument.FunctionCounter$Builder.register(FunctionCounter.java:122)
    	at io.micrometer.core.instrument.binder.jvm.ExecutorServiceMetrics.monitor(ExecutorServiceMetrics.java:312)
    	at io.micrometer.core.instrument.binder.jvm.ExecutorServiceMetrics.bindTo(ExecutorServiceMetrics.java:275)
    	at com.rzzsdxx.proj.support_modules.web_socket.back_forth.impl.WsBackForthService.<init>(WsBackForthService.java:60)
    	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:212)
    

    What should I do? Thanks!

    opened by fzyzcjy 27
  • InfluxDB 2.0 API support

    InfluxDB 2.0 API support

    Looks like the 'direct' api for 1.x will not work with 2.0. Thankfully the changes seem pretty small, for comparison 1.x write api and 2.x write api

    The body remains the same (line protocol), only major change I believe is for auth (though user + password is probably also possible), instead of db query param there is org and bucket. There is also an official java client library, though I am not sure if micrometer needs all the functionality it provides.

    Sorry if there is already something in place to configure micrometer so it works with influxdb 2.0 (directly), but I did not find it.

    enhancement spring-boot change registry: influx 
    opened by AarjavP 24
  • Micrometer logs error message when partial error happens due to Infinity value using Elasticsearch

    Micrometer logs error message when partial error happens due to Infinity value using Elasticsearch

    Micrometer core and micrometer-elastic version: 1.1.3

    Springboot version: 2.1.3.RELEASE

    Hi, Using micrometer getting metrics from springboot application using micrometer-registry-elastic

    Micrometer keeps logging error messages:

    ERROR [market-fetcher,,,] 8106 --- [trics-publisher] i.m.elastic.ElasticMeterRegistry : failed to send metrics to elastic:

    When checking elastic index it's working, index get's updated with new values but I noticed one of the entries in there reports an error:

    {"index":{"_index":"market-fetcher-metrics-2019-04","_type":"doc","_id":"XyEp_WkB2oH6K2ScUlT5","status":400,"error":{"type":"mapper_parsing_exception","reason":"failed to parse [value]","caused_by":{"type":"illegal_argument_exception","reason":"[float] supports only finite values, but got [Infinity]"}}}}

    which is probably what's causing the error log entry being generated. I guess it should instead be able to wrap / handle Infinity? Also not sure where the error is exactly from as we don't explicitly wrap any of the metrics in primitive float, still investigating that.

    Find below a full entry of the log error message and pls let me know if it needs further details.

    '2019-04-08 15:35:37.761 ERROR [market-fetcher,,,] 8106 --- [trics-publisher] i.m.elastic.ElasticMeterRegistry : failed to send metrics to elastic: {"took":24,"errors":true,"items":[{"index":{"_index":"market-fetcher-metrics-2019-04","_type":"doc","_id":"CCEp_WkB2oH6K2ScUlT5","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":322,"_primary_term":1,"status":201}},{"index":{"_index":"market-fetcher-metrics-2019-04","_type":"doc","_id":"CSEp_WkB2oH6K2ScUlT5","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":328,"_primary_term":1,"status":201}}, ... ,{"index":{"_index":"market-fetcher-metrics-2019-04","_type":"doc","_id":"XyEp_WkB2oH6K2ScUlT5","status":400,"error":{"type":"mapper_parsing_exception","reason":"failed to parse [value]","caused_by":{"type":"illegal_argument_exception","reason":"[float] supports only finite values, but got [Infinity]"}}}},{"index":{"_index":"market-fetcher-metrics-2019-04","_type":"doc","_id":"YCEp_WkB2oH6K2ScUlT5","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":345,"_primary_term":1,"status":201}},{"index":{"_index":"market-fetcher-metrics-2019-04","_type":"doc","_id":"YSEp_WkB2oH6K2ScUlT5","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":341,"_primary_term":1,"status":201}}, ... ,{"index":{"_index":"market-fetcher-metrics-2019-04","_type":"doc","_id":"EiEp_WkB2oH6K2ScUlX6","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"_seq_no":383,"_primary_term":1,"status":201}}]}'

    bug registry: elastic 
    opened by mmaia 24
  • Can't get baggage to propagate with boot 3 and micrometer tracing

    Can't get baggage to propagate with boot 3 and micrometer tracing

    Describe the bug I can't get remote baggage fields to propagate using spring boot 3 and micrometer tracing.

    Environment Local machine

    • Micrometer version: 1.0.0
    • Micrometer registry : N/A
    • OS: macOS
    • Java version: 19.0.1

    To Reproduce How to reproduce the bug:

    1. See project: https://github.com/eitansuez/dtrace-boot3-example which contains an automated test that fails, or..
    2. ..Use the micrometer sample module "baggage consumer" https://github.com/micrometer-metrics/micrometer-samples/tree/main/baggage-consumer as follows: start the app (gradle bootRun), then curl the endpoint at localhost:7200/ with the header "myremotefield" and value "my-remote-field-value" and note how the RemoteFieldsTestChecker returns an error.

    Expected behavior If i define a baggage remote-field to propagate, i expect that field to show up in http requests to upstream services.

    Additional context Slack thread: https://micrometer-metrics.slack.com/archives/C662HUJC9/p1670600358434289

    waiting-for-triage 
    opened by eitansuez 23
  • Counter meter to send its data as Stackdriver's CUMULATIVE MetricKind

    Counter meter to send its data as Stackdriver's CUMULATIVE MetricKind

    I am looking into sending a counter meter data from my application and calculate SLO out of it in Stackdriver. Stackdriver is allowing to send two kinds of metrics: GAUGE and CUMULATIVE and Micrometer's Stackdriver registry is using GAUGE for all the meters. The problem is that Stackdriver can't calculate, so called, request-based SLO out of a GAUGE metric, because it is conceptually a discrete sample of state and for request-based SLO, full information is required. I think sending CUMULATIVE data for a Counter meter would not only solve my problem, but also would be a better representation of what it is doing. I prepared my proposed implementation and would also try to submit it as a pull request.

    Resolves #2773

    opened by tmarszal 23
  • ByteBuf.release() was not called before it's garbage-collected

    ByteBuf.release() was not called before it's garbage-collected

    Micrometer version: 1.1.2

    Publishing metrics with statsD micrometer occasionally throws the following exception:

    i.m.s.i.n.u.ResourceLeakDetector: LEAK: ByteBuf.release() was not called before it's garbage-collected. See https://netty.io/wiki/reference-counted-objects.html for more information.
    Recent access records: 
    Created at:
        io.micrometer.shaded.io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:349)
        io.micrometer.shaded.io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:187)
        io.micrometer.shaded.io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:173)
        io.micrometer.shaded.io.netty.buffer.AbstractByteBufAllocator.buffer(AbstractByteBufAllocator.java:107)
        io.micrometer.shaded.reactor.netty.NettyOutbound.lambda$sendString$5(NettyOutbound.java:300)
        io.micrometer.shaded.reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:100)
        io.micrometer.shaded.reactor.core.publisher.FluxOnBackpressureLatest$LatestSubscriber.drain(FluxOnBackpressureLatest.java:176)
        io.micrometer.shaded.reactor.core.publisher.FluxOnBackpressureLatest$LatestSubscriber.onNext(FluxOnBackpressureLatest.java:127)
        io.micrometer.shaded.reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:114)
        io.micrometer.shaded.reactor.core.publisher.FluxBufferPredicate$BufferPredicateSubscriber.onNextNewBuffer(FluxBufferPredicate.java:277)
        io.micrometer.shaded.reactor.core.publisher.FluxBufferPredicate$BufferPredicateSubscriber.tryOnNext(FluxBufferPredicate.java:224)
        io.micrometer.shaded.reactor.core.publisher.FluxBufferPredicate$BufferPredicateSubscriber.onNext(FluxBufferPredicate.java:194)
        io.micrometer.shaded.reactor.core.publisher.FluxFlatMap$FlatMapMain.tryEmit(FluxFlatMap.java:530)
        io.micrometer.shaded.reactor.core.publisher.FluxFlatMap$FlatMapInner.onNext(FluxFlatMap.java:972)
        io.micrometer.shaded.reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:192)
        io.micrometer.shaded.reactor.core.publisher.DirectProcessor$DirectInner.onNext(DirectProcessor.java:333)
        io.micrometer.shaded.reactor.core.publisher.DirectProcessor.onNext(DirectProcessor.java:142)
        io.micrometer.shaded.reactor.core.publisher.FluxCreate$IgnoreSink.next(FluxCreate.java:618)
        io.micrometer.shaded.reactor.core.publisher.FluxCreate$SerializedSink.next(FluxCreate.java:153)
        io.micrometer.statsd.StatsdDistributionSummary.recordNonNegative(StatsdDistributionSummary.java:52)
        io.micrometer.core.instrument.AbstractDistributionSummary.record(AbstractDistributionSummary.java:49)
        io.micrometer.core.instrument.composite.CompositeDistributionSummary.lambda$record$0(CompositeDistributionSummary.java:38)
        java.base/java.lang.Iterable.forEach(Iterable.java:75)
        io.micrometer.core.instrument.composite.AbstractCompositeMeter.forEachChild(AbstractCompositeMeter.java:47)
        io.micrometer.core.instrument.composite.CompositeDistributionSummary.record(CompositeDistributionSummary.java:38)
    registry: statsd 
    opened by nithya11 23
  • Multi-gauge: create multiple metrics from a single function

    Multi-gauge: create multiple metrics from a single function

    Hi, I tried to create a list of gauge from the result of a query and i didn't find any way to do that.

    I have the following query which return the size of elements in database (postgres) :

    SELECT N.nspname || '.' || C.relname AS "relation", CASE WHEN reltype = 0 THEN pg_total_relation_size(C.oid) ELSE pg_total_relation_size(C.oid) END AS "size" FROM pg_class C LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) LEFT JOIN pg_tables T ON (T.tablename = C.relname) LEFT JOIN pg_indexes I ON (I.indexname = C.relname) WHERE nspname NOT IN ('pg_catalog','pg_toast','information_schema');

    My idea was to create a list of gauge with : id : 'db.relation.size' with tag 'relation' and value 'size'.

    So that why i wanted to create a single function that perform the sql call and that allow me to create a list of gauge.

    Maybe I'm wrong and that's not the right way of doing that or maybe this is contrary to the philosophy of Micrometer.

    Thanks in advance of your help.

    opened by ochezeau 23
  • Is the name `spring-metrics` confusing?

    Is the name `spring-metrics` confusing?

    I foresee two primary modules in this project. The Spring aspect that leverages actuator, etc makes sense being called spring-metrics, however the other aspect is similar to slf4j and really is just a metrics-facade.

    I would love to be able to encourage all Java project to leverage the facade benefits, even if they aren't using Spring and I wouldn't want the name to drive them away.

    Ideas:

    • metrics-interface (maybe shortened to mi4j, but then it looks like leet speak 'miaj'), also is pretty generic,
    • meterize - Memorable and unique, also leverages the 'meter' terminology well
    • dendro - Out in left field, but 'dendrochronology' is the science of measuring tree growth via rings. (trees grows a lot during the 'Spring') ... yeah a stretch.

    I realize that optional deps can keep the modules flexible, but it does feel like if the 2 concerns are made explicit it could save confusion in the long run.

    I favor meterize, and spring-metrics, even though the names aren't parallel.

    I don't think this is urgent, just wanted to make sure we had this conversation.

    question 
    opened by checketts 23
  • Stackdriver metrics not ending up in Stackdriver

    Stackdriver metrics not ending up in Stackdriver

    Micrometer version: 1.1.0 Spring boot version: 5.1.0 JDK version: 11

    There seem to be multiple issues with the Stackdriver integration of Micrometer:

    1. Metrics are created, but are not under the Global resource it seems. (The ones with global were created using our current solution) See also the screenshot below. missing-global
    2. When debugging, the StackdriverMeterRegistry#publish call is just done once. With the LoggingMeterRegistry, the publish-method is called every interval.
    3. Any way of using Spring integration with actuator?
    4. Feature request: Can we use the prefix for the custom metric, so instead of custom/jvm/buffer/etc something like custom/{prefix}/jvm/buffer/etc? This makes it much easier to distinguish between services running in the same project.
    5. I'm also missing the documentation right now. ;-)

    See also the demo zip I have added for my sample code. monitoringdemo.zip

    bug 
    opened by amohabir 22
  • Possible

    Possible "memory-leak" in KafkaStreamsMetrics

    Describe the bug When using KafkaStreamsMetrics the heap-usage seems to be ever-increasing for objects of type io.micrometer.core.instrument.ImmutableTag.

    Internally in KafkaMetrics theres a Set holding "registeredMeters":

    private final Set<Meter> registeredMeters = ConcurrentHashMap.newKeySet();
    

    https://github.com/micrometer-metrics/micrometer/blob/1.7.x/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/kafka/KafkaMetrics.java#L92

    Every minute a scheduler runs KafkaMetrics#checkAndBindMetrics, which retrieves all metrics from the metric-supplier (KafkaStreams#metrics) and checks if currentMeters.equals(metrics.keySet()). If false the metrics returned from the metric-supplier are passed to KafkaMetrics#bindMeter which registers a new meter and add the meter to the registeredMeters set (https://github.com/micrometer-metrics/micrometer/blob/1.7.x/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/kafka/KafkaMetrics.java#L221). Any existing meter with the same name/tags is not removed, so every time this is done, the set will increase.

    This would not be a problem if the metric-supplier (KafkaStreams#metrics) returned the same metrics on each call, but this can actually vary a lot. After rebalances for example, KafkaStreams#Metrics returns "consumer-fetch-manager" metrics for a while. Every time the call differs from the previous, all kafka-streams metrics (~3-4000 metrics) are added to the set.

    Here is a heap-dump of an app which has been running for a couple of days and gone through a lot of rebalances and broker restarts. It eventually OOM's:

    image image

    I guess the fix here would be to clean the existing registeredMeters set before adding new ones. It was introduced in this issue: https://github.com/micrometer-metrics/micrometer/issues/2018 https://github.com/micrometer-metrics/micrometer/commit/603264632e3be5336902f65d42abbf2ed6769d45

    Environment

    • Micrometer version: 1.7.5
    • Micrometer registry: prometheus
    • OS: macOS, ubuntu
    • Java version: openjdk version "1.8.0_302"

    To Reproduce Added sample app. Run multiple instances, restart one instance to trigger rebalances, watch the io.micrometer.core.instrument.binder.kafka.KafkaMetrics.registeredMeters increase after scheduled calls to "checkAndBindMetrics" https://github.com/JorgenRingen/micrometer_1_7_5_high_heap_usage

    Expected behavior HEAP-usage should not gradually increase when return from KafkaStreams#metrics changes over time, but remain stable.

    Any additional context Don't know why we're suddenly experiencing this issue, we have been using KafkaStreamsMetrics for some time, but an upgrade to kafka-streams 2.8.x and more variance between calls to KafkaStreams#metrics might be the cause.

    bug performance regression module: micrometer-core 
    opened by JorgenRingen 21
  • Bump com.gradle.enterprise from 3.12 to 3.12.1

    Bump com.gradle.enterprise from 3.12 to 3.12.1

    Bumps com.gradle.enterprise from 3.12 to 3.12.1.

    Dependabot compatibility score

    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 commands and options

    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)
    dependency-upgrade java 
    opened by dependabot[bot] 0
  • Calling `MeterRegistry#clear` from multiple threads causes weird bugs with missing/incorrect metrics

    Calling `MeterRegistry#clear` from multiple threads causes weird bugs with missing/incorrect metrics

    Describe the bug Calling MeterRegistry#clear from multiple threads causes weird bugs with missing/incorrect metrics

    Environment

    • Micrometer version: 1.10.2
    • Micrometer registry: Prometheus
    • OS: Linux
    • Java version: openjdk version "17.0.5" 2022-10-18

    To Reproduce How to reproduce the bug:

    Minimal repro application: https://github.com/perlun/micrometer-registration-unregistration-issue

    Expected behavior The tests should work consistently.

    Actual behavior The MicrometerRegistrationTest fails around 30% of the time:

    image

    Here is one of the failures:

    Expected size: 1 but was: 0 in:
    []
    java.lang.AssertionError: 
    Expected size: 1 but was: 0 in:
    []
    	at micrometer.registration.unregistration.issue.MicrometerRegistrationTest.recorder_job_metric_is_published_using_expected_name(MicrometerRegistrationTest.java:68)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
    	at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
    	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
    	at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
    	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
    	at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestTemplateMethod(TimeoutExtension.java:94)
    	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
    	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
    	at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
    	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
    	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
    	at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
    	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
    	at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
    	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
    	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
    	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185)
    	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.submit(ForkJoinPoolHierarchicalTestExecutorService.java:118)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask$DefaultDynamicTestExecutor.execute(NodeTestTask.java:226)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask$DefaultDynamicTestExecutor.execute(NodeTestTask.java:204)
    	at org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.execute(TestTemplateTestDescriptor.java:142)
    	at org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.lambda$execute$2(TestTemplateTestDescriptor.java:110)
    	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
    	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
    	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
    	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    	at java.base/java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180)
    	at java.base/java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:104)
    	at java.base/java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:711)
    	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
    	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
    	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
    	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
    	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
    	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
    	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
    	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
    	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
    	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
    	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
    	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
    	at org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.execute(TestTemplateTestDescriptor.java:110)
    	at org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.execute(TestTemplateTestDescriptor.java:44)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185)
    	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    	at org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185)
    	at java.base/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:194)
    	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
    	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
    	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
    	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
    	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
    

    Here's another test failure:

    expected: "centre_job_recorder_programs_total{type="processed",} 42.0"
     but was: "centre_job_recorder_programs_total{type="processed",} 0.0"
    org.opentest4j.AssertionFailedError: 
    expected: "centre_job_recorder_programs_total{type="processed",} 42.0"
     but was: "centre_job_recorder_programs_total{type="processed",} 0.0"
    	at [email protected]/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at [email protected]/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
    	at [email protected]/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at [email protected]/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
    	at app//micrometer.registration.unregistration.issue.MicrometerRegistrationTest.recorder_job_metric_is_published_using_expected_name(MicrometerRegistrationTest.java:70)
    	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at [email protected]/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    	at [email protected]/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at [email protected]/java.lang.reflect.Method.invoke(Method.java:568)
    	at app//org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727)
    	at app//org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
    	at app//org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
    	at app//org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156)
    	at app//org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:147)
    	at app//org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestTemplateMethod(TimeoutExtension.java:94)
    	at app//org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103)
    	at app//org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93)
    	at app//org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
    	at app//org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
    	at app//org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
    	at app//org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
    	at app//org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92)
    	at app//org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86)
    	at app//org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
    	at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at app//org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
    	at app//org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
    	at app//org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
    	at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    	at app//org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    	at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    	at app//org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185)
    	at app//org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.submit(ForkJoinPoolHierarchicalTestExecutorService.java:118)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask$DefaultDynamicTestExecutor.execute(NodeTestTask.java:226)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask$DefaultDynamicTestExecutor.execute(NodeTestTask.java:204)
    	at app//org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.execute(TestTemplateTestDescriptor.java:142)
    	at app//org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.lambda$execute$2(TestTemplateTestDescriptor.java:110)
    	at [email protected]/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    	at [email protected]/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
    	at [email protected]/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
    	at [email protected]/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
    	at [email protected]/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
    	at [email protected]/java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180)
    	at [email protected]/java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:104)
    	at [email protected]/java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:711)
    	at [email protected]/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
    	at [email protected]/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
    	at [email protected]/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
    	at [email protected]/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
    	at [email protected]/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    	at [email protected]/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
    	at [email protected]/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:276)
    	at [email protected]/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
    	at [email protected]/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
    	at [email protected]/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
    	at [email protected]/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
    	at [email protected]/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
    	at [email protected]/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    	at [email protected]/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
    	at app//org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.execute(TestTemplateTestDescriptor.java:110)
    	at app//org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.execute(TestTemplateTestDescriptor.java:44)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
    	at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    	at app//org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    	at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    	at app//org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185)
    	at app//org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService.invokeAll(ForkJoinPoolHierarchicalTestExecutorService.java:129)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    	at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    	at app//org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    	at app//org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    	at app//org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    	at app//org.junit.platform.engine.support.hierarchical.ForkJoinPoolHierarchicalTestExecutorService$ExclusiveTask.compute(ForkJoinPoolHierarchicalTestExecutorService.java:185)
    	at [email protected]/java.util.concurrent.RecursiveAction.exec(RecursiveAction.java:194)
    	at [email protected]/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
    	at [email protected]/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
    	at [email protected]/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
    	at [email protected]/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
    	at [email protected]/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
    

    Additional context We have a wrapper class on top of MeterRegistry which is called MicrometerRegistryFactory. This has historical reasons since we used to support Dropwizard and Micrometer as separate metrics implementations in our platform.

    It also serves an important job (which isn't fully illustrated in the repro): it creates a CompositeRegistry, to which the Micrometer global registry gets added (see MicrometerRegistryFactory#getOrCreateMeterRegistry). This is likely to be part of the problem. The reason for this is that we need this approach for to reasons:

    • For custom JMX naming (not seen in the repro, but it exists in the real production code)
    • To be able to make the PrometheusPublisher class access these metrics, so they can be properly exposed via HTTP.

    Workaround Right now, we have @AfterEach hooks in place which clears all metric registries which have been used by a test. This is necessary to avoid metrics "leaking out" from one test to another. However, if I remove this cleanup code the tests works consistently. :thinking:

    commit e166926857579442b59b97cb7131c214c260aa11
    Author: Per Lundberg <[email protected]>
    Date:   Mon Dec 19 11:39:50 2022 +0200
    
        WIP: Remove removeAllMetrics call
    
    diff --git lib/src/test/java/micrometer/registration/unregistration/issue/MetricRegistryWrapperTest.java lib/src/test/java/micrometer/registration/unregistration/issue/MetricRegistryWrapperTest.java
    index a86b849..8e00db1 100644
    --- lib/src/test/java/micrometer/registration/unregistration/issue/MetricRegistryWrapperTest.java
    +++ lib/src/test/java/micrometer/registration/unregistration/issue/MetricRegistryWrapperTest.java
    @@ -1,7 +1,5 @@
     package micrometer.registration.unregistration.issue;
     
    -import static micrometer.registration.unregistration.issue.MicrometerRegistrationTest.removeAllMetrics;
    -
     import org.junit.jupiter.api.AfterEach;
     import org.junit.jupiter.api.BeforeEach;
     import org.junit.jupiter.api.RepeatedTest;
    @@ -23,9 +21,6 @@ public class MetricRegistryWrapperTest {
         @AfterEach
         public void tearDown() {
             registryFactory.close();
    -
    -        // This is required to avoid leaking state to other tests.
    -        removeAllMetrics( registryFactory );
         }
     
         @RepeatedTest( 250 )
    diff --git lib/src/test/java/micrometer/registration/unregistration/issue/MicrometerRegistrationTest.java lib/src/test/java/micrometer/registration/unregistration/issue/MicrometerRegistrationTest.java
    index 15805f7..8ebee6b 100644
    --- lib/src/test/java/micrometer/registration/unregistration/issue/MicrometerRegistrationTest.java
    +++ lib/src/test/java/micrometer/registration/unregistration/issue/MicrometerRegistrationTest.java
    @@ -7,7 +7,6 @@ import static org.assertj.core.api.Fail.fail;
     import java.io.IOException;
     import java.net.SocketException;
     import java.net.URL;
    -import java.util.Collection;
     import java.util.List;
     import java.util.Map;
     
    @@ -42,9 +41,6 @@ class MicrometerRegistrationTest {
         @AfterEach
         void tearDown() {
             registryFactory.close();
    -
    -        // This is required to avoid leaking state to other tests.
    -        removeAllMetrics( registryFactory );
         }
     
         @RepeatedTest( 150 )
    @@ -87,16 +83,6 @@ class MicrometerRegistrationTest {
             return Pair.of( registryFactory, prometheusHost + ":" + registryFactory.getPrometheusPort() );
         }
     
    -    public static void removeAllMetrics( MicrometerRegistryFactory factory ) {
    -        Collection<MeterRegistry> meterRegistries = factory.getMeterRegistries();
    -
    -        for ( MeterRegistry meterRegistry : meterRegistries ) {
    -            meterRegistry.clear();
    -        }
    -
    -        meterRegistries.clear();
    -    }
    -
         public static List<String> getPrometheusMetrics( String prometheusHost, String metricName ) throws IOException {
             List<String> responseLines = getAllPrometheusMetrics( prometheusHost );
     
    
    feedback needed 
    opened by perlun 8
  • Micrometer client not reconnecting to statsd after server is restarted

    Micrometer client not reconnecting to statsd after server is restarted

    Describe the bug The micrometer client does not reconnect to the statsd server (Datadog agent) when the agent is restarted.

    Environment

    • Micrometer version - 1.9.5
    • Micrometer registry - statsd, Datadog flavor
    • OS: Linux
    • Java version: 11.0.14

    To Reproduce How to reproduce the bug: Restart the statsd server (datadog-agent)

    Expected behavior A clear and concise description of what you expected to happen.

    The micrometer client re-establishes a connection to the statsd server on port 8125 when the daemon is back up.

    Additional context Add any other context about the problem here, e.g. related issues.

    waiting-for-triage 
    opened by dunnk2022 0
  • Add additional JVM metrics

    Add additional JVM metrics

    • generate a metric for total Threads started since the JVM start time. This is extremely useful to understand how an application is doing on thread creation and also understand the creation patterns. The existing metrics give the current status of threads but nothing about whether the threads are created newly or are existing ones. This metric will aid in such scenarios by taking deltas.
    opened by lenin-jaganathan 0
  • Class Unloading metrics are distorted in Step Registries

    Class Unloading metrics are distorted in Step Registries

    Describe the bug Currently, the JVM class unloading metric is being registered as a Function counter. The description says "The total number of classes unloaded since the Java virtual machine has started execution" which will not be true when this metric is used in a Step Meter Registry.

    Environment

    • Micrometer version - Any version
    • Micrometer registry - Any Step Registry can be used
    • OS: Any
    • Java version: Any

    To Reproduce How to reproduce the bug: Start the java application with the micrometer JVM binder enabled. Use any step registry to register these metrics. After one step is completed, the unloaded class becomes zero.

    Expected behavior jvm.classes.unloaded - should represent the total number of classes unloaded since the Java virtual machine has started execution

    waiting-for-triage 
    opened by lenin-jaganathan 1
  • Flooded with

    Flooded with "Could not serialize meter XXX: Value was NaN" with Dynatrace plugin

    Describe the bug Dynatrace exporter prints a lot of WARNs with Could not serialize meter kafka.xxx: Value was NaN meters.

    Environment

    I added micrometer-registry-dynatrace to my Spring Boot application to have the additional metrics exported to Dynatrace.

    The pod is instrumented by the OneAgent and the exporter is able to detect that:

    13:03:03.317  INFO 1 --- [           main] i.m.dynatrace.DynatraceMeterRegistry     : Exporting to Dynatrace metrics API v2
    13:03:03.321  INFO 1 --- [           main] i.m.dynatrace.v2.DynatraceExporterV2     : Exporting to endpoint https://xxx.yyy/zzz/www/api/v2/metrics/ingest
    13:03:03.385  INFO 1 --- [           main] i.m.c.instrument.push.PushMeterRegistry  : publishing metrics for DynatraceMeterRegistry every 1m
    

    However, later on, after the Kafka consumer initialization, I see:

    13:04:00.034  WARN 1 --- [trics-publisher] i.m.dynatrace.v2.DynatraceExporterV2     : Could not serialize meter kafka.consumer.coordinator.partition.lost.latency.max: Value was NaN.
    13:04:00.036  WARN 1 --- [trics-publisher] i.m.dynatrace.v2.DynatraceExporterV2     : Could not serialize meter kafka.consumer.coordinator.partition.lost.latency.avg: Value was NaN.
    13:04:00.049  WARN 1 --- [trics-publisher] i.m.dynatrace.v2.DynatraceExporterV2     : Could not serialize meter kafka.consumer.reauthentication.latency.avg: Value was NaN.
    13:04:00.049  WARN 1 --- [trics-publisher] i.m.dynatrace.v2.DynatraceExporterV2     : Could not serialize meter kafka.consumer.reauthentication.latency.max: Value was NaN.
    13:04:00.078  WARN 1 --- [trics-publisher] i.m.dynatrace.v2.DynatraceExporterV2     : Could not serialize meter kafka.consumer.coordinator.partition.lost.latency.max: Value was NaN.
    13:04:00.081  WARN 1 --- [trics-publisher] i.m.dynatrace.v2.DynatraceExporterV2     : Could not serialize meter kafka.consumer.coordinator.partition.lost.latency.avg: Value was NaN.
    13:04:00.099  WARN 1 --- [trics-publisher] i.m.dynatrace.v2.DynatraceExporterV2     : Could not serialize meter kafka.consumer.coordinator.commit.latency.avg: Value was NaN.
    13:04:00.101  WARN 1 --- [trics-publisher] i.m.dynatrace.v2.DynatraceExporterV2     : Could not serialize meter kafka.consumer.reauthentication.latency.max: Value was NaN.
    13:04:00.105  WARN 1 --- [trics-publisher] i.m.dynatrace.v2.DynatraceExporterV2     : Could not serialize meter kafka.consumer.coordinator.commit.latency.max: Value was NaN.
    13:04:00.106  WARN 1 --- [trics-publisher] i.m.dynatrace.v2.DynatraceExporterV2     : Could not serialize meter kafka.consumer.reauthentication.latency.max: Value was NaN.
    

    After a while I see a lot of that kind of message repeated (all Kafka-related).

    I use Spring Boot 2.7.3 with Micrometer 1.10.2 running JDK 17 on Kubernetes. The pod is instrumented by the OneAgent (and it seems to work fine in general as the generic metrics from JVM are gathered). The problem is similar to https://github.com/micrometer-metrics/micrometer/issues/1343, but it was fixed years ago. Do you have an idea why it is problematic with those Kafka meters?

    To Reproduce See above description.

    Expected behavior The metrics are exported to Dynatrace without any errors

    Additional context Related issue: https://github.com/micrometer-metrics/micrometer/issues/1343

    feedback needed 
    opened by szpak 2
Releases(v1.10.2)
  • v1.10.2(Nov 23, 2022)

    :lady_beetle: Bug Fixes

    • Fix logic to choose ObservationConvention #3543
    • Parent Observation is missing from the toString() of Observation.Context #3542

    :heart: Contributors

    Thank you to all the contributors who worked on this release:

    @bclozel

    Source code(tar.gz)
    Source code(zip)
  • v1.10.1(Nov 16, 2022)

    :lady_beetle: Bug Fixes

    • Add nullable to Observation.parentObservation #3532
    • Adds an option to allow removal of low & high cardinality key values #3529

    :memo: Tasks

    • Add Javadoc since for Observation.Context.remove*() #3536

    :heart: Contributors

    Thank you to all the contributors who worked on this release:

    @izeye and @ttddyy

    Source code(tar.gz)
    Source code(zip)
  • v1.9.6(Nov 16, 2022)

    :lady_beetle: Bug Fixes

    • Non-monotonic kafka metric reported as counter #3300

    :hammer: Dependency Upgrades

    • Bump com.gradle.enterprise to 3.11.4 #3539
    • Upgrade to JMH Gradle Plugin 0.6.8 #3538
    • Upgrade Spring Boot to 2.7.5 #3523
    • Upgrade Spring Cloud to 3.1.5 #3520
    • Upgrade Google Cloud Monitoring to 3.2.10 #3519
    • Upgrade Spring Boot to 2.6.13 #3522
    • Upgrade Mockito to 4.8.1 #3517
    • Upgrade SignalFx to 1.0.25 #3516
    • Upgrade AWS SDK V1 to 1.12.335 and V2 to 2.18.10 #3515
    • Upgrade Reactor to 3.4.24, Reactor-Netty to 1.0.24, and Netty to 4.1.82 #3514

    :memo: Tasks

    • Test helper hasValue in SignalFxMeterRegistryTest checks int value even if not set #3450
    • Update CircleCI OpenJDK images to 8.0.345 and 11.0.16 respectively #3501
    • Redact Dynatrace token in error logs #3484

    :heart: Contributors

    Thank you to all the contributors who worked on this release:

    @pirgeo, @arminru, and @izeye

    Source code(tar.gz)
    Source code(zip)
  • v1.8.12(Nov 16, 2022)

    :lady_beetle: Bug Fixes

    • Non-monotonic kafka metric reported as counter #3300

    :hammer: Dependency Upgrades

    • Bump com.gradle.enterprise 3.11.4 #3539
    • Upgrade to JMH Gradle Plugin 0.6.8 #3538
    • Upgrade Spring Boot to 2.6.13 #3522
    • Upgrade Mockito to 4.8.1 #3517
    • Upgrade SignalFx to 1.0.25 #3516
    • Upgrade AWS SDK V1 to 1.12.335 and V2 to 2.18.10 #3515
    • Upgrade Reactor to 3.4.24, Reactor-Netty to 1.0.24, and Netty to 4.1.82 #3514

    :memo: Tasks

    • Improve implementation of Kafka metrics type mapping #3499
    • Update CircleCI OpenJDK images to 8.0.345 and 11.0.16 respectively #3501
    • Redact Dynatrace token in error logs #3484

    :heart: Contributors

    Thank you to all the contributors who worked on this release:

    @pirgeo, @arminru, and @izeye

    Source code(tar.gz)
    Source code(zip)
  • v1.10.0(Nov 7, 2022)

    Micrometer 1.10.0 is the GA version of a new feature release. See our support policy for support timelines. Below are the combined release notes of all the pre-release milestones and release candidate preceding it.

    :warning: Noteworthy

    :star: New Features / Enhancements

    • Add gRPC authority info to the observation context #3510
    • Add "get[Low|High]CardinalityKeyValue()" on "Observation.Context" #3505
    • Verify sender propagation for HTTP client instrumentation #3504
    • Add support for creating KeyValues from any iterable #3503
    • Added remoteServiceAddress for Sender / Receiver contexts #3500
    • Provide a default for missing values in KeyValue #3458
    • Allow documenting optional keys #3454
    • Add wrap functionality to the Observation #3433
    • Add Observation instrumentation for gRPC client and server #3427
    • Add TestObservationRegistryAssert assertion for observation count #3426
    • Make observation return its context and immutable access to parent #3423
    • ReceiverContext was missing a remoteServiceName #3419
    • Handle IO_ERROR for Apache HTTP client with observation API #3418
    • Tck with observations #3410
    • Set size and characteristics for Spliterator used with Tags and KeyValues #3409
    • Test against ObservationDocumentation in instrumentation TCK #3372
    • Add benchmarks for the Observation API #3370
    • Support for Jetty 11 #3234
    • Add "createNotStarted" method that lazily creates context #3401
    • Context allows modification of KeyValues #3383
    • Cloudwatch max batchSize was increased from 20 to 1000 #3376
    • Events in DocumentedObservation #3367
    • signalfx: remove unnecessary allocation if the distribution summary does not have histogram #3364
    • Remote service name for sender context #3363
    • Common ResponseContext interface for interacting with the response #3362
    • JDK11 HttpClient instrumentation #3358
    • Abstraction for instrumentating with a Timer or Observation (optionally) #3357
    • [signalfxregistry]: Add option to send delta histogram count buckets. #3350
    • Apache HTTP client instrumentation with Observation #3312
    • Generify throwable in CheckedCallable/CheckedRunnable #3326
    • Scoped checked actions #3323
    • ObservationContextAssert now asserts ContextView, add parentObservation assertions #3304
    • Add ObservationRegistry hasRemainingCurrentScope and similar assertions #3303
    • Add getContextualName(Context c) on Observation.Convention #3301
    • Receiver and SenderContext #3293
    • Added option to set a parent Observation on an existing Observation #3291
    • Introduces GlobalObservationConvention #3285
    • Declare HdrHistogram as a runtime dependency #3263
    • Observe instantaneous events #3100
    • Add primitive Suppliers to Timer and LongTaskTimer #1304
    • Add assertions for multiple handled test contexts #3274
    • Added the ObservationConventionAware interface #3270
    • Add ObservationContextAssert error assertions #3267
    • Improved keys assertions in ObservationContextAssert #3266
    • Further improvement of observation convention #3261
    • Added support for Kotlin co-routines #3256
    • New approach to naming conventions #3255
    • Add KeyValues to the Observation #3244
    • @Observed #3221
    • Add a LongTaskTimer for every Observation in TimerObservationHandler #3215
    • Add DynatraceConfig.DEFAULT #3202
    • OkHttp3 instrumentation with observation api #3176
    • Support for different metric prefixes in StackdriverMeterRegistry #3171
    • Unable to load MacOSDnsServerAddressStreamProvider on Apple Silicon with statsd meter registries #3066
    • Add HighCardinalityTagsDetector #3047
    • Http client instrumentation TCK #3258
    • Added the getCurrentObservationScope method #3158
    • Config for OTLP Resource attributes #3159
    • Dynatrace registry: Print ignored config warning only when necessary #3155
    • Dynatrace registry: Truncate log output #3148
    • Use more generic KeyValue terminology in Observation and Common module #3126
    • NOOP Observation should be created when no handlers are registered #3105
    • MeterRegistryAssert provides checks for all type of meters #3104
    • Add MongoCommandStartedEventTags for Mongodb metrics #3069
    • Make _source.enabled configurable for ElasticMeterRegistry #2363
    • Added Global Tags Provider #3061
    • Add observeChecked methods to observe methods that can throw exceptions #3052
    • Merge micrometer-binder changes and revert micrometer-api changes #3046
    • Add observe method to the Observation for Runnable and Supplier #3040
    • Observation text publisher #3034
    • Iterable<Tag> vs Iterable<? extends Tag> #2092
    • Add base units for ForkJoinPool #1525
    • Convert a BiPredicate for ObservationConfig to a dedicated interface #3003
    • New Observation concept; revert Timer.Sample changes #2992
    • Introduce HttpTagsProvider with default implementation #2945
    • Current sample and Scope API #2871
    • Timer handlers #2856
    • Add method to SimpleMeterRegistry for outputting all meters #2946

    :lady_beetle: Bug Fixes

    • Fix failure message in ObservationContextAssert.hasSubsetOfKeys() #3495
    • Non-monotonic kafka metric reported as counter #3300
    • New Relic module fails on the module path #3412
    • 'java.lang.module.FindException: Unable to derive module descriptor' when using module path with micrometer-core 1.10.0-M5 #3398
    • New Relic module fails on the module path #3412
    • signalfx: add tests for emiting percentile and histograms, fix timer #3369
    • DocumentedObservation may always override contextual name to null #3307
    • Fix generic parameters for composite observations #3173
    • Service descriptor files not merged/transformed in statsd shadowJar #3268
    • Accidental strict dep on LatencyUtils #1599
    • Provider better APIs to move between Instrument Tags and Commons Tags #3102
    • Failed to record timer metrics in native image with percentiles configured #3002
    • Correct PostgreSQL metrics for dead tuples, with integration tests and refactoring #2474
    • Dependency cycle between micrometer-core and reactor-netty caused by ReactorNettySender #2802
    • Netty HTTP codec module included in statsd JAR #2929
    • LongTaskTimer always converts durations of measurements to nanos #2947

    :notebook_with_decorative_cover: Documentation

    • Automate non-Javadoc multi-line comments for license headers #2942
    • Switch license header to a multiline comment instead of JavaDoc #2412

    :hammer: Dependency Upgrades

    • Upgrade Spring Boot to 2.7.5 #3523
    • Upgrade Spring Cloud to 3.1.5 #3520
    • Upgrade Google Cloud Monitoring to 3.2.10 #3519
    • Upgrade Spring Boot to 2.6.13 #3522
    • Upgrade Mockito to 4.8.1 #3517
    • Upgrade SignalFx to 1.0.25 #3516
    • Upgrade AWS SDK V1 to 1.12.335 and V2 to 2.18.10 #3515
    • Upgrade Reactor to 3.4.24, Reactor-Netty to 1.0.24, and Netty to 4.1.82 #3514
    • Bump com.gradle.enterprise from 3.11.2 to 3.11.3 #3509
    • Bump com.gradle.enterprise from 3.11.1 to 3.11.2 #3491
    • Upgrade context-propagation to 1.0.0-RC1 for 1.10.0-RC1 #3477
    • Upgrade Spotless plugin to 6.11.0 #3475
    • Upgrade to me.champeau.mrjar 0.1.1 #3422
    • Upgrade Dropwizard Metrics to 4.2.12 #3474
    • Upgrade spectator (atlas) to 1.3.8 #3473
    • Upgrade Spring Boot to 2.7.4 #3472
    • Upgrade Spring Boot to 2.6.12 #3471
    • Upgrade testcontainers to 1.17.5 #3470
    • Upgrade junit 5.9.1, assertj to 3.23.1, mockito to 4.8.0, archunit to 1.0.0 #3469
    • Upgrade wavefront-sdk-java to 3.0.3 #3467
    • Upgrade signalfx-java to 1.0.24 #3466
    • Upgrade AWS SDK to 1.12.318 and 2.17.289 #3465
    • Upgrade netty to 4.1.81 reactor-netty to 1.0.23 and reactor to 3.4.23 #3464
    • Upgrade gradle-download-task plugin to 5.2.1 #3463
    • Upgrade nebula-release-plugin to 16.1.0 #3462
    • Upgrade Spring Java Format dependencies to 0.0.35 #3459
    • Properly pin gradle-info-plugin to 11.4.1 #3441
    • Upgrade to Spotless Gradle Plugin 6.10.0 #3397
    • Use 5.9.+ for JUnit BOM #3356
    • Upgrade to context-propagation 1.0.0-M3 #3278
    • Upgrade to Kotlin 1.7.10 #3276
    • Use latest.release for io.opentelemetry.proto:opentelemetry-proto #3259
    • Update samples to use Spring Boot 2.7.0 #3205
    • Update lock files for 1.10.0-M2 #3169
    • Upgrade to Elasticsearch 8.1.3 and 7.17.3 for integration tests #3142
    • Upgrade Spectator to 1.3.2 #3168
    • Upgrade to Mockito 4.5.1 #3167
    • Upgrade to AWS SDK v1 1.12.217 and v2 2.17.188 #3166
    • Upgrade to Reactor 3.4.18, Reactor-Netty 1.0.19, Netty 4.1.77.Final #3165
    • Upgrade to JMH 1.35 #3164
    • Upgrade to Testcontainers 1.17.1 #3163
    • Upgrade to Wiremock 2.33.2 #3162
    • Upgrade to SignalFx 1.0.18 #3161
    • Bump context propagation to 1.0.0-M2 #3133
    • Pin to context-propagation-api 1.0.0-M1 #3072
    • Upgrade Mockito to 4.3.1 #3029
    • Upgrade AWS SDK v1 to 1.12.158 and v2 to 2.17.129 #3028
    • Upgrade Netty to 4.1.74.Final #3026
    • Upgrade Javaformat to 0.0.31 #3025
    • Upgrade JUnit to 5.8.2 and Testcontainers to 1.16.3 #3024
    • Upgrade Dropwizard Metrics to 4.1.30 #3023
    • Upgrade Slf4J to 1.7.36 #3022
    • Upgrade to Gradle Wrapper 7.4 #3001
    • Upgrade build jdk to 17.0.2, 8.0.322 #2988
    • Pin Dropwizard 4.+ instead of 4.0.+ #2905
    • Upgrade Spring Boot to 2.6.2 (samples) #2968
    • Upgrade JMH to 1.34 #2967
    • Upgrade Mockito to 4.2.0 #2966
    • Upgrade AWS SDK v1 to 1.12.136 and AWS SDK v2 to 2.17.107 #2964
    • Upgrade Spectator to 1.0.14 #2963
    • Upgrade to reactor 3.4.13, reactor-netty 1.0.14, netty 4.1.72.Final #2923
    • Upgrade JUnit platform to 1.7.2 and vintage-engine to 5.7.2 #2962
    • Upgrade awaitility to 4.1.1 #2961
    • Upgrade Testcontainers to 1.16.2 #2960
    • Upgrade ArchUnit to 0.22.0 #2959
    • Upgrade spring-javaformat to 0.0.29 #2958
    • Upgrade Spring Boot to 2.4.13 (samples) #2957
    • Upgrade AssertJ to 3.22.0 #2956
    • Upgrade SignalFx to 1.0.14 #2955
    • Upgrade Dropwizard Metrics to 4.1.29 #2954
    • Upgrade to Azure ApplicationInsights 2.6.4 #2953
    • Upgrade Logback to 1.2.10 #2952
    • Upgrade to Log4j 2 2.17.1 #2937
    • Upgrade Log4J to 2.17.0 #2927
    • Upgrade Logback to 1.2.9 #2926
    • Upgrade Logback to 1.2.8 #2922
    • Upgrade to log4j 2.16.0 #2918
    • Upgrade to log4j 2.15.0 #2910

    :memo: Tasks

    • Verify sender propagation for HTTP server instrumentation #3507
    • Update CircleCI OpenJDK images to 8.0.345 and 11.0.16 respectively #3501
    • Redact Dynatrace token in error logs #3484
    • Disable downloadBaseline task for micrometer-jetty11 #3481
    • Generate dependency lock files for 1.10.0-RC1 #3476
    • Bump to a medium+ resource class for CI builds #3455
    • Exclude buildscript-gradle.lockfile in deleteLockFiles task #3445
    • Update samples to use Spring Boot 2.7.4 #3434
    • Rename DocumentedObservation to ObservationDocumentation #3430
    • Test SLFJ4 2.0 compatibility #3415
    • Update OtlpMeterRegistryTest to run builds on Java 19 #3431
    • Pin wiremock-jre8-standalone to 2.33.+ for 1.8.x and 1.9.x #3468
    • Reduce flakiness of StatsdMeterRegistryPublishTest #3447
    • Update TagsTest to run builds on Java 19 #3437
    • Upgrade to JApicmp Gradle Plugin 0.4.1 #3435
    • Support message supplier in WarnThenDebugLogger #3424
    • Ignore METHOD_NEW_DEFAULT binary compatibility #3181
    • Pin Jersey dependencies to 3.0.+ in its sample #3136
    • Polish OTLP registry changes #3153
    • Typo in OtlpLongTaskTImer #3147
    • Remove deprecated GangliaConfig protocolVersion and rateUnits #3018
    • Remove deprecated ElasticConfig#documentType #3017
    • Remove deprecated constructor and dropwizard dependency in Ganglia registry #3016
    • Remove deprecated method newLongTaskTimer(Id) on MeterRegistry #3015
    • Remove deprecated KafkaConsumerMetrics #3013
    • Remove deprecated JettyStatisticsMetrics #3012
    • Remove deprecated HibernateMetrics and HibernateQueryMetrics #3011
    • Remove deprecated DiskSpaceMetrics #3010
    • Replace deprecated AbstractLifeCycleListener usage in Jetty tests #3014
    • Upgrade Elasticsearch Docker image to 7.16.3 in integration tests #2986
    • Use Testcontainers for MongoDB integration tests #2984
    • Pin spectator-api to 1.0.+ for Micrometer 1.8.x #3027
    • Store the Meter.Id instead of the Meter in KafkaMetrics #2991
    • Bump up Gradle plugin dependencies #2979
    • Use branch name in dependencies cache key for CircleCI #2975
    • Upgrade to Gradle Shadow plugin 7.1.2 #2973
    • Upgrade to Gradle Enterprise Gradle plugin 3.8 #2949
    • Backport test improvements from 2.0.x to 1.7.x #2943
    • Use daemon thread in CommonsObjectPool2Metrics #2938
    • Suppress "warning: no comment" in javadoc task #2935
    • Disable javadoc task for sample projects #2934
    • Upgrade to Gradle Wrapper 7.3.3 #2931
    • Upgrade to Gradle Wrapper 7.3.2 #2921
    • Upgrade build images to JDK 8.0.312 and 11.0.13 #2919
    • Upgrade build machine image to ubuntu-2004:202111-01 #2913
    • Upgrade build images to JDK 17.0.1, 11.0.12, 8.0.302 #2912
    • Use Javadoc code instead of Markdown backticks #2907

    :heart: Contributors

    Thank you to all the contributors who worked on this release:

    @pirgeo, @arminru, @izeye, @philwebb, @kilink, @bogdandrutu, @bclozel, @simonbasle, @marschall, @violetagg, @sshplendid, @jprinet, @easimonand, and @ttddyy

    Source code(tar.gz)
    Source code(zip)
  • v1.10.0-RC1(Oct 10, 2022)

    :star: New Features / Enhancements

    • Provide a default for missing values in KeyValue #3458
    • Allow documenting optional keys #3454
    • Add wrap functionality to the Observation #3433
    • Add Observation instrumentation for gRPC client and server #3427
    • Add TestObservationRegistryAssert assertion for observation count #3426
    • Make observation return its context and immutable access to parent #3423
    • ReceiverContext was missing a remoteServiceName #3419
    • Handle IO_ERROR for Apache HTTP client with observation API #3418
    • Tck with observations #3410
    • Set size and characteristics for Spliterator used with Tags and KeyValues #3409
    • Test against ObservationDocumentation in instrumentation TCK #3372
    • Add benchmarks for the Observation API #3370
    • Support for Jetty 11 #3234

    :lady_beetle: Bug Fixes

    • New Relic module fails on the module path #3412

    :hammer: Dependency Upgrades

    • Upgrade context-propagation to 1.0.0-RC1 for 1.10.0-RC1 #3477
    • Upgrade Spotless plugin to 6.11.0 #3475
    • Upgrade to me.champeau.mrjar 0.1.1 #3422
    • Upgrade Dropwizard Metrics to 4.2.12 #3474
    • Upgrade spectator (atlas) to 1.3.8 #3473
    • Upgrade Spring Boot to 2.7.4 #3472
    • Upgrade Spring Boot to 2.6.12 #3471
    • Upgrade testcontainers to 1.17.5 #3470
    • Upgrade junit 5.9.1, assertj to 3.23.1, mockito to 4.8.0, archunit to 1.0.0 #3469
    • Upgrade wavefront-sdk-java to 3.0.3 #3467
    • Upgrade signalfx-java to 1.0.24 #3466
    • Upgrade AWS SDK to 1.12.318 and 2.17.289 #3465
    • Upgrade netty to 4.1.81 reactor-netty to 1.0.23 and reactor to 3.4.23 #3464
    • Upgrade gradle-download-task plugin to 5.2.1 #3463
    • Upgrade nebula-release-plugin to 16.1.0 #3462
    • Upgrade Spring Java Format dependencies to 0.0.35 #3459
    • Properly pin gradle-info-plugin to 11.4.1 #3441

    :memo: Tasks

    • Disable downloadBaseline task for micrometer-jetty11 #3481
    • Generate dependency lock files for 1.10.0-RC1 #3476
    • Bump to a medium+ resource class for CI builds #3455
    • Exclude buildscript-gradle.lockfile in deleteLockFiles task #3445
    • Update samples to use Spring Boot 2.7.4 #3434
    • Rename DocumentedObservation to ObservationDocumentation #3430
    • Test SLFJ4 2.0 compatibility #3415
    • Update OtlpMeterRegistryTest to run builds on Java 19 #3431
    • Pin wiremock-jre8-standalone to 2.33.+ for 1.8.x and 1.9.x #3468
    • Reduce flakiness of StatsdMeterRegistryPublishTest #3447
    • Update TagsTest to run builds on Java 19 #3437
    • Upgrade to JApicmp Gradle Plugin 0.4.1 #3435
    • Support message supplier in WarnThenDebugLogger #3424
    • Ignore METHOD_NEW_DEFAULT binary compatibility #3181

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye
    • @ttddyy
    • @kilink
    Source code(tar.gz)
    Source code(zip)
  • v1.9.5(Oct 10, 2022)

    :lady_beetle: Bug Fixes

    • New Relic module fails on the module path #3412

    :hammer: Dependency Upgrades

    • Upgrade Dropwizard Metrics to 4.2.12 #3474
    • Upgrade spectator (atlas) to 1.3.8 #3473
    • Upgrade Spring Boot to 2.7.4 #3472
    • Upgrade Spring Boot to 2.6.12 #3471
    • Upgrade testcontainers to 1.17.5 #3470
    • Upgrade junit 5.9.1, assertj to 3.23.1, mockito to 4.8.0, archunit to 1.0.0 #3469
    • Upgrade wavefront-sdk-java to 3.0.3 #3467
    • Upgrade signalfx-java to 1.0.24 #3466
    • Upgrade AWS SDK to 1.12.318 and 2.17.289 #3465
    • Upgrade netty to 4.1.81 reactor-netty to 1.0.23 and reactor to 3.4.23 #3464
    • Upgrade gradle-download-task plugin to 5.2.1 #3463
    • Upgrade nebula-release-plugin to 16.1.0 #3462
    • Upgrade Spring Java Format dependencies to 0.0.35 #3459
    • Properly pin gradle-info-plugin to 11.4.1 #3441

    :memo: Tasks

    • Update OtlpMeterRegistryTest to run builds on Java 19 #3431
    • Pin wiremock-jre8-standalone to 2.33.+ for 1.8.x and 1.9.x #3468
    • Reduce flakiness of StatsdMeterRegistryPublishTest #3447
    • Update TagsTest to run builds on Java 19 #3437
    • Upgrade to JApicmp Gradle Plugin 0.4.1 #3435
    • Support message supplier in WarnThenDebugLogger #3424
    • Ignore METHOD_NEW_DEFAULT binary compatibility #3181

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye
    Source code(tar.gz)
    Source code(zip)
  • v1.8.11(Oct 10, 2022)

    :lady_beetle: Bug Fixes

    • New Relic module fails on the module path #3412

    :hammer: Dependency Upgrades

    • Upgrade Spring Boot to 2.6.12 #3471
    • Upgrade testcontainers to 1.17.5 #3470
    • Upgrade junit 5.9.1, assertj to 3.23.1, mockito to 4.8.0, archunit to 1.0.0 #3469
    • Upgrade wavefront-sdk-java to 3.0.3 #3467
    • Upgrade signalfx-java to 1.0.24 #3466
    • Upgrade AWS SDK to 1.12.318 and 2.17.289 #3465
    • Upgrade netty to 4.1.81 reactor-netty to 1.0.23 and reactor to 3.4.23 #3464
    • Upgrade gradle-download-task plugin to 5.2.1 #3463
    • Upgrade nebula-release-plugin to 16.1.0 #3462
    • Upgrade Spring Java Format dependencies to 0.0.35 #3459
    • Properly pin gradle-info-plugin to 11.4.1 #3441

    :memo: Tasks

    • Pin wiremock-jre8-standalone to 2.33.+ for 1.8.x and 1.9.x #3468
    • Reduce flakiness of StatsdMeterRegistryPublishTest #3447
    • Update TagsTest to run builds on Java 19 #3437
    • Upgrade to JApicmp Gradle Plugin 0.4.1 #3435
    • Support message supplier in WarnThenDebugLogger #3424
    • Ignore METHOD_NEW_DEFAULT binary compatibility #3181

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye
    • @andrew-krasny
    Source code(tar.gz)
    Source code(zip)
  • v1.10.0-M6(Sep 14, 2022)

    :lady_beetle: Bug Fixes

    • 'java.lang.module.FindException: Unable to derive module descriptor' when using module path with micrometer-core 1.10.0-M5 #3398
    • New Relic module fails on the module path #3412
    Source code(tar.gz)
    Source code(zip)
  • v1.10.0-M5(Sep 12, 2022)

    :star: New Features

    • Add "createNotStarted" method that lazily creates context #3401
    • Context allows modification of KeyValues #3383
    • Cloudwatch max batchSize was increased from 20 to 1000 #3376
    • Events in DocumentedObservation #3367
    • signalfx: remove unnecessary allocation if the distribution summary does not have histogram #3364
    • Remote service name for sender context #3363
    • Common ResponseContext interface for interacting with the response #3362
    • JDK11 HttpClient instrumentation #3358
    • Abstraction for instrumentating with a Timer or Observation (optionally) #3357
    • [signalfxregistry]: Add option to send delta histogram count buckets. #3350
    • Apache HTTP client instrumentation with Observation #3312

    :lady_beetle: Bug Fixes

    • signalfx: add tests for emiting percentile and histograms, fix timer #3369

    :hammer: Dependency Upgrades

    • Upgrade to Spotless Gradle Plugin 6.10.0 #3397
    • Use 5.9.+ for JUnit BOM #3356

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    Source code(tar.gz)
    Source code(zip)
  • v1.9.4(Sep 12, 2022)

    :star: New Features

    • HTTP server instrumentation TCK #3379

    :lady_beetle: Bug Fixes

    • system.cpu.usage missing with OpenJ9 0.33.0 #3349
    • Uri tag replaced with REDIRECTION on all HTTP redirect responses with Jersey server #3327

    :hammer: Dependency Upgrades

    • Upgrade to signalfx-java 1.0.23 #3407
    • Upgrade to aws-java-sdk-cloudwatch 1.12.300 and software.amazon.awssdk:cloudwatch 2.17.271 #3406
    • Upgrade to Reactor 2020.0.22 and netty 4.1.81 #3405
    • Upgrade to Test Retry Gradle Plugin 1.4.1 #3380
    • Bump com.gradle.enterprise from 3.10.3 to 3.11.1 #3353

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye
    Source code(tar.gz)
    Source code(zip)
  • v1.8.10(Sep 12, 2022)

    :star: New Features

    • HTTP server instrumentation TCK #3379

    :lady_beetle: Bug Fixes

    • system.cpu.usage missing with OpenJ9 0.33.0 #3349
    • Uri tag replaced with REDIRECTION on all HTTP redirect responses with Jersey server #3327

    :hammer: Dependency Upgrades

    • Upgrade to signalfx-java 1.0.23 #3407
    • Upgrade to aws-java-sdk-cloudwatch 1.12.300 and software.amazon.awssdk:cloudwatch 2.17.271 #3406
    • Upgrade to Reactor 2020.0.22 and netty 4.1.81 #3405
    • Upgrade to Test Retry Gradle Plugin 1.4.1 #3380
    • Bump com.gradle.enterprise from 3.10.3 to 3.11.1 #3353

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye
    Source code(tar.gz)
    Source code(zip)
  • v1.10.0-M4(Aug 8, 2022)

    :star: New Features

    • Generify throwable in CheckedCallable/CheckedRunnable #3326
    • Scoped checked actions #3323
    • ObservationContextAssert now asserts ContextView, add parentObservation assertions #3304
    • Add ObservationRegistry hasRemainingCurrentScope and similar assertions #3303
    • Add getContextualName(Context c) on Observation.Convention #3301
    • Receiver and SenderContext #3293
    • Added option to set a parent Observation on an existing Observation #3291
    • Introduces GlobalObservationConvention #3285
    • Declare HdrHistogram as a runtime dependency #3263
    • Observe instantaneous events #3100
    • Add primitive Suppliers to Timer and LongTaskTimer #1304

    :lady_beetle: Bug Fixes

    • DocumentedObservation may always override contextual name to null #3307

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye, @bclozel, @simonbasle
    Source code(tar.gz)
    Source code(zip)
  • v1.9.3(Aug 8, 2022)

    :star: New Features

    • Make descriptions static for cache metrics #3321
    • Avoid allocation of iterator with Tags#empty instance #3313

    :lady_beetle: Bug Fixes

    • HttpClientTimingInstrumentationVerificationTests cannot be implemented #3308
    • ClassNotFoundException is thrown in a non-Spring Boot application when excluding LatencyUtils #3287
    • Return value of LongTaskTimer#record and recordCallable is not marked Nullable #3284

    :hammer: Dependency Upgrades

    • Upgrade to io.dropwizard.metrics:metrics-graphite 4.2.11 #3340
    • Backport unpinning of de.flapdoodle.embed.mongo version #3339
    • Upgrade to netty 4.1.79, reactor-bom 2020.0.21 #3338
    • Upgrade to signalfx-java 1.0.21 #3337
    • Upgrade to io.dropwizard.metrics:metrics-graphite 4.1.33 #3336
    • Upgrade to aws-java-sdk-cloudwatch 1.12.276 and software.amazon.awssdk:cloudwatch:2.17.247 #3335
    • Upgrade to Gradle Wrapper 7.5.1 #3334
    • Upgrade io.spring.ge.conventions to 0.0.11 #3289

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye, @bogdandrutu
    Source code(tar.gz)
    Source code(zip)
  • v1.8.9(Aug 8, 2022)

    :star: New Features

    • Make descriptions static for cache metrics #3321
    • Avoid allocation of iterator with Tags#empty instance #3313

    :lady_beetle: Bug Fixes

    • HttpClientTimingInstrumentationVerificationTests cannot be implemented #3308
    • ClassNotFoundException is thrown in a non-Spring Boot application when excluding LatencyUtils #3287
    • Return value of LongTaskTimer#record and recordCallable is not marked Nullable #3284

    :hammer: Dependency Upgrades

    • Backport unpinning of de.flapdoodle.embed.mongo version #3339
    • Upgrade to netty 4.1.79, reactor-bom 2020.0.21 #3338
    • Upgrade to signalfx-java 1.0.21 #3337
    • Upgrade to io.dropwizard.metrics:metrics-graphite 4.1.33 #3336
    • Upgrade to aws-java-sdk-cloudwatch 1.12.276 and software.amazon.awssdk:cloudwatch:2.17.247 #3335
    • Upgrade to Gradle Wrapper 7.5.1 #3334
    • Upgrade io.spring.ge.conventions to 0.0.11 #3289

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye, @bogdandrutu
    Source code(tar.gz)
    Source code(zip)
  • v1.10.0-M3(Jul 11, 2022)

    :star: New Features

    • Add assertions for multiple handled test contexts #3274
    • Added the ObservationConventionAware interface #3270
    • Add ObservationContextAssert error assertions #3267
    • Improved keys assertions in ObservationContextAssert #3266
    • Further improvement of observation convention #3261
    • Added support for Kotlin co-routines #3256
    • New approach to naming conventions #3255
    • Add KeyValues to the Observation #3244
    • @Observed #3221
    • Add a LongTaskTimer for every Observation in TimerObservationHandler #3215
    • Add DynatraceConfig.DEFAULT #3202
    • OkHttp3 instrumentation with observation api #3176
    • Support for different metric prefixes in StackdriverMeterRegistry #3171
    • Unable to load MacOSDnsServerAddressStreamProvider on Apple Silicon with statsd meter registries #3066
    • Add HighCardinalityTagsDetector #3047
    • Http client instrumentation TCK #3258

    :lady_beetle: Bug Fixes

    • Fix generic parameters for composite observations #3173
    • Service descriptor files not merged/transformed in statsd shadowJar #3268
    • Accidental strict dep on LatencyUtils #1599

    :hammer: Dependency Upgrades

    • Upgrade to context-propagation 1.0.0-M3 #3278
    • Upgrade to Kotlin 1.7.10 #3276
    • Use latest.release for io.opentelemetry.proto:opentelemetry-proto #3259
    • Update samples to use Spring Boot 2.7.0 #3205

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye, @simonbasle, @marschall
    Source code(tar.gz)
    Source code(zip)
  • v1.9.2(Jul 11, 2022)

    :star: New Features

    • Http client instrumentation TCK #3258

    :lady_beetle: Bug Fixes

    • Service descriptor files not merged/transformed in statsd shadowJar #3268
    • Accidental strict dep on LatencyUtils #1599

    :hammer: Dependency Upgrades

    • Upgrade to dropwizard metrics 4.2.10 #3282
    • Upgrade to aws-java-sdk-cloudwatch 1.12.257 and awssdk:cloudwatch 2.17.228 #3281
    • Upgrade to signalfx-java 1.0.20 #3280
    • Upgrade to Spring Java Format 0.0.34 #3248

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    Source code(tar.gz)
    Source code(zip)
  • v1.8.8(Jul 11, 2022)

    :star: New Features

    • Http client instrumentation TCK #3258

    :lady_beetle: Bug Fixes

    • Service descriptor files not merged/transformed in statsd shadowJar #3268
    • Accidental strict dep on LatencyUtils #1599

    :hammer: Dependency Upgrades

    • Upgrade to aws-java-sdk-cloudwatch 1.12.257 and awssdk:cloudwatch 2.17.228 #3281
    • Upgrade to signalfx-java 1.0.20 #3280
    • Upgrade to Spring Java Format 0.0.34 #3248

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye
    Source code(tar.gz)
    Source code(zip)
  • v1.9.1(Jun 15, 2022)

    :star: New Features

    • Make descriptions static where they are not #3201

    :lady_beetle: Bug Fixes

    • TimedAspect timedClass missing shouldSkip predicate check #3194
    • NPE in TimedAspect (JdkDynamicAopProxy) #3190
    • WavefrontMeterRegistry.close() does not remove threads leading to memory leak #3196
    • TimeWindowMax#record causes allocation #3193

    :hammer: Dependency Upgrades

    • Upgrade to google-cloud-monitoring 3.2.9 #3229
    • Upgrade to Atlas spectator 1.3.5 #3228
    • Upgrade to Dropwizard metrics-graphite 4.1.32 #3227
    • Upgrade to wavefront-sdk-java 3.0.2 #3226
    • Upgrade to AWS SDK 1.12.240 and 2.17.211 #3225
    • Upgrade to signalfx-java 1.0.19 #3224
    • Upgrade to Reactor 2020.0.20 and Netty 4.1.78 #3219
    • Upgrade to Spring Java Format 0.0.33 #3199
    • Upgrade to Test Retry Gradle Plugin 1.4.0 #3182
    • Upgrade to Mockito 4.5.1 #3167
    • Upgrade to JMH 1.35 #3164
    • Upgrade to Testcontainers 1.17.1 #3163
    • Upgrade to Wiremock 2.33.2 #3162

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    Source code(tar.gz)
    Source code(zip)
  • v1.8.7(Jun 15, 2022)

    :star: New Features

    • Make descriptions static where they are not #3201

    :lady_beetle: Bug Fixes

    • WavefrontMeterRegistry.close() does not remove threads leading to memory leak #3196
    • TimeWindowMax#record causes allocation #3193

    :hammer: Dependency Upgrades

    • Upgrade to Dropwizard metrics-graphite 4.1.32 #3227
    • Upgrade to wavefront-sdk-java 3.0.2 #3226
    • Upgrade to AWS SDK 1.12.240 and 2.17.211 #3225
    • Upgrade to signalfx-java 1.0.19 #3224
    • Upgrade to Reactor 2020.0.20 and Netty 4.1.78 #3219
    • Upgrade to Spring Java Format 0.0.33 #3199
    • Upgrade to Test Retry Gradle Plugin 1.4.0 #3182
    • Upgrade to Mockito 4.5.1 #3167
    • Upgrade to JMH 1.35 #3164
    • Upgrade to Testcontainers 1.17.1 #3163
    • Upgrade to Wiremock 2.33.2 #3162

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    Source code(tar.gz)
    Source code(zip)
  • v1.10.0-M2(May 11, 2022)

    :star: New Features / Enhancements

    • Added the getCurrentObservationScope method #3158
    • Config for OTLP Resource attributes #3159
    • Dynatrace registry: Print ignored config warning only when necessary #3155
    • Dynatrace registry: Truncate log output #3148

    :hammer: Dependency Upgrades

    • Update lock files for 1.10.0-M2 #3169
    • Upgrade to Elasticsearch 8.1.3 and 7.17.3 for integration tests #3142
    • Upgrade Spectator to 1.3.2 #3168
    • Upgrade to Mockito 4.5.1 #3167
    • Upgrade to AWS SDK v1 1.12.217 and v2 2.17.188 #3166
    • Upgrade to Reactor 3.4.18, Reactor-Netty 1.0.19, Netty 4.1.77.Final #3165
    • Upgrade to JMH 1.35 #3164
    • Upgrade to Testcontainers 1.17.1 #3163
    • Upgrade to Wiremock 2.33.2 #3162
    • Upgrade to SignalFx 1.0.18 #3161

    :memo: Tasks

    • Pin Jersey dependencies to 3.0.+ in its sample #3136
    • Polish OTLP registry changes #3153
    • Typo in OtlpLongTaskTImer #3147

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye
    • @arminru
    • @pirgeo
    Source code(tar.gz)
    Source code(zip)
  • v1.9.0(May 11, 2022)

    Micrometer 1.9.0 is the GA version of an LTS feature release. Below are the combined release notes of all the pre-release milestones and release candidate preceding it.

    :warning: Noteworthy

    • ReactorNettySender has been removed. See #2802
    • Remove superseded micrometer-jersey2 module #2865
    • Remove deprecated RegistryResolver #2815

    :star: New Features / Enhancements

    • Config for OTLP Resource attributes #3159
    • Dynatrace registry: Print ignored config warning only when necessary #3155
    • Dynatrace registry: Truncate log output #3148
    • Add resettable DistributionSummary and Timer for Dynatrace registry #3093
    • Add capability to correctly export fixed buckets histogram to SignalFx #2977
    • OpenTelemetry Protocol (OTLP) MeterRegistry #2864
    • Exemplars support for Prometheus Histogram #2812
    • Exemplars support for Prometheus Counter #2811
    • Be able to target classes and not only methods with TimedAspect #493
    • Prevent CompositeMeter allocating on each record #3059
    • Support writing to elastic data streams #2996
    • Allow file-based configuration for Dynatrace v2 exporter #2916
    • Add method to SimpleMeterRegistry for outputting all meters #2946

    :lady_beetle: Bug Fixes

    • OTLP resource service name is always unknown #3146
    • Dynatrace file-based configuration slow on macOS #3035
    • Dynatrace v2 ingestion reporting "inconsistent gauge fields" #3007
    • Failed to record timer metrics in native image with percentiles configured #3002
    • Correct PostgreSQL metrics for dead tuples, with integration tests and refactoring #2474
    • Dependency cycle between micrometer-core and reactor-netty caused by ReactorNettySender #2802
    • Netty HTTP codec module included in statsd JAR #2929
    • LongTaskTimer always converts durations of measurements to nanos #2947
    • Statsd meter recordings are dropped when submitted from parallel threads #2880
    • KafkaMetrics' refresh scheduler can stop in some corner cases #2879
    • jvm.gc.live.data.size and max not updating for optavgpause/optthruput collectors #2874
    • Intermittent GC data size metrics with Shenandoah and ZGC #2872
    • MetricsRequestEventListener with @Timed(longTask=true) makes two meters #2861

    :notebook_with_decorative_cover: Documentation

    • Automate non-Javadoc multi-line comments for license headers #2942
    • Switch license header to a multiline comment instead of JavaDoc #2412

    :hammer: Dependency Upgrades

    • Upgrade Spectator to 1.3.2 #3168
    • Upgrade to Mockito 4.5.1 #3167
    • Upgrade to AWS SDK v1 1.12.217 and v2 2.17.188 #3166
    • Upgrade to Reactor 3.4.18, Reactor-Netty 1.0.19, Netty 4.1.77.Final #3165
    • Upgrade to JMH 1.35 #3164
    • Upgrade to Testcontainers 1.17.1 #3163
    • Upgrade to Wiremock 2.33.2 #3162
    • Upgrade to SignalFx 1.0.18 #3161
    • Upgrade to Reactor 2020.0.17 and Netty 4.1.75 #3084
    • Upgrade to Amazon AWS SDK 1.12.178 and 2.17.149 #3078
    • Upgrade to Mockito 4.4.0 #3077
    • Upgrade archunit to 0.23.1 and awaitility to 4.2.0 #3076
    • Upgrade to logback 1.2.11 #3075
    • Upgrade to Dropwizard Metrics 4.1.31 #3074
    • Upgrade Mockito to 4.3.1 #3029
    • Upgrade AWS SDK v1 to 1.12.158 and v2 to 2.17.129 #3028
    • Upgrade Netty to 4.1.74.Final #3026
    • Upgrade Javaformat to 0.0.31 #3025
    • Upgrade JUnit to 5.8.2 and Testcontainers to 1.16.3 #3024
    • Upgrade Dropwizard Metrics to 4.1.30 #3023
    • Upgrade Slf4J to 1.7.36 #3022
    • Upgrade to Gradle Wrapper 7.4 #3001
    • Upgrade build jdk to 17.0.2, 8.0.322 [#2988](https://github.com/micrometer-metrics/micrometer/issues/2988
    • Pin Dropwizard 4.+ instead of 4.0.+ #2905
    • Upgrade Spring Boot to 2.6.2 (samples) #2968
    • Upgrade JMH to 1.34 #2967
    • Upgrade Mockito to 4.2.0 #2966
    • Upgrade AWS SDK v1 to 1.12.136 and AWS SDK v2 to 2.17.107 #2964
    • Upgrade Spectator to 1.0.14 #2963
    • Upgrade to Reactor 2020.0.15 #2974
    • Upgrade JUnit platform to 1.7.2 and vintage-engine to 5.7.2 #2962
    • Upgrade awaitility to 4.1.1 #2961
    • Upgrade Testcontainers to 1.16.2 #2960
    • Upgrade ArchUnit to 0.22.0 #2959
    • Upgrade spring-javaformat to 0.0.29 #2958
    • Upgrade Spring Boot to 2.4.13 (samples) #2957
    • Upgrade AssertJ to 3.22.0 #2956
    • Upgrade SignalFx to 1.0.14 #2955
    • Upgrade Dropwizard Metrics to 4.1.29 #2954
    • Upgrade to Azure ApplicationInsights 2.6.4 #2953
    • Upgrade Logback to 1.2.10 #2952
    • Upgrade to Log4j 2 2.17.1 #2937
    • Upgrade JUnit to 5.8.2 and Mockito to 4.1.0 #2902
    • Upgrade AWS SDK V1 to 1.12.126 and V2 to 2.17.97 #2900
    • Upgrade Spectator to 1.0.7 #2899
    • Upgrade JMH to 1.33 #2898
    • Upgrade Wiremock to 2.32.0 #2897
    • Upgrade logback to 1.2.7 #2896

    :memo: Tasks

    • Polish OTLP registry changes #3153
    • Typo in OtlpLongTaskTImer #3147
    • Unpin google-cloud-monitoring dependency #3081
    • Simplify tests after Dynatrace Metric Utils 1.5.0 release #3065
    • Move cache and http core classes back to core #3050
    • Add integration tests for Elasticsearch 8 #3037
    • Replace deprecated AbstractLifeCycleListener usage in Jetty tests #3014
    • Upgrade Elasticsearch Docker image to 7.16.3 in integration tests #2986
    • Use Testcontainers for MongoDB integration tests #2984
    • Pin spectator-api to 1.0.+ for Micrometer 1.8.x #3027
    • Store the Meter.Id instead of the Meter in KafkaMetrics #2991
    • Bump up Gradle plugin dependencies #2979
    • Use branch name in dependencies cache key for CircleCI #2975
    • Upgrade to Gradle Shadow plugin 7.1.2 #2973
    • Pinning Prometheus to 0.12.x for Micrometer 1.8.x #2965
    • Upgrade to Gradle Enterprise Gradle plugin 3.8 #2949
    • Backport test improvements from 2.0.x to 1.7.x #2943
    • Use daemon thread in CommonsObjectPool2Metrics #2938
    • Suppress "warning: no comment" in javadoc task #2935
    • Disable javadoc task for sample projects #2934
    • Upgrade to Gradle Wrapper 7.3.3 #2931
    • Upgrade build images to JDK 8.0.312 and 11.0.13 #2919
    • Upgrade build machine image to ubuntu-2004:202111-01 #2913
    • Upgrade build images to JDK 17.0.1, 11.0.12, 8.0.302 #2912
    • Use Javadoc code instead of Markdown backticks #2907
    • Generate lock files for 1.9.0-M1 #2903
    • Remove superseded micrometer-jersey2 module #2865
    • Remove deprecated RegistryResolver #2815
    • Locking dynatrace-metric-utils-java to 1.1.+ #2901
    • Update samples to use Spring Boot 2.6.1 #2891
    • Deprecate ReactorNettySenderTest #2884
    • Upgrade to Gradle Wrapper 7.3.1 #2882
    • Update Gradle Enterprise Plugin to 3.7.2 #2869

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye
    • @arminru
    • @pirgeo
    • @bogdandrutu
    • @mateuszrzeszutek
    • @OleksiiBondar
    • @BrentDouglas
    • @jprinet
    • @easimon
    Source code(tar.gz)
    Source code(zip)
  • v1.8.6(May 11, 2022)

  • v1.7.12(May 11, 2022)

    Note: This is the final planned patch release of the 1.7.x line. We recommend upgrading to a supported version.

    This release contains only internal changes that should not affect users. See the milestone for details.

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye
    Source code(tar.gz)
    Source code(zip)
  • v1.10.0-M1(Apr 19, 2022)

    We previously published 2.0.0 milestones: 2.0.0-M1, 2.0.0-M2, and 2.0.0-M3. These were pre-release milestones in work towards a 2.0.0 GA release. We are changing direction. Features that were being worked on for that 2.0 release will instead be released as a 1.10.0 GA version that maintains compatibility with the 1.x line. This preview release is a milestone of that work that will eventually be released as a GA 1.10.0.

    See the 1.10 Migration Guide for more details.

    Upgrading from 2.0.0-M3

    The micrometer-binders module has been reverted (#3119). Update your imports of binders to the previous package in micrometer-core io.micrometer.core.instrument.binder. Remove any dependencies on the micrometer-binders module; this is no longer published.

    Changes since 2.0.0-M3

    :star: New Features / Enhancements

    • Use more generic KeyValue terminology in Observation and Common module #3126
    • NOOP Observation should be created when no handlers are registered #3105
    • MeterRegistryAssert provides checks for all type of meters #3104
    • Add MongoCommandStartedEventTags for Mongodb metrics #3069
    • Make _source.enabled configurable for ElasticMeterRegistry #2363

    :lady_beetle: Bug Fixes

    • Provider better APIs to move between Instrument Tags and Commons Tags #3102

    :hammer: Dependency Upgrades

    • Bump context propagation to 1.0.0-M2 #3133

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye
    • @violetagg
    • @sshplendid
    Source code(tar.gz)
    Source code(zip)
  • v1.9.0-RC1(Apr 15, 2022)

    Note: This is a pre-production preview release for the purposes of early testing. See the Milestone releases section of the README.

    Upgrading from 1.9.0-M4

    The micrometer-binders module has been reverted (#3119). Update your imports of binders to the previous package in micrometer-core io.micrometer.core.instrument.binder. Remove any dependencies on the micrometer-binders module; this is no longer published.

    :star: New Features

    • Add resettable DistributionSummary and Timer for Dynatrace registry #3093
    • Add capability to correctly export fixed buckets histogram to SignalFx #2977
    • OpenTelemetry Protocol (OTLP) MeterRegistry #2864
    • Exemplars support for Prometheus Histogram #2812

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye, @pirgeo, @bogdandrutu
    Source code(tar.gz)
    Source code(zip)
  • v1.8.5(Apr 14, 2022)

    :lady_beetle: Bug Fixes

    • TimedAspect advice return value should be marked Nullable #3041

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye, @jprinet, @breedx-splk
    Source code(tar.gz)
    Source code(zip)
  • v1.7.11(Apr 14, 2022)

    :lady_beetle: Bug Fixes

    • TimedAspect advice return value should be marked Nullable #3041

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye, @jprinet, @breedx-splk
    Source code(tar.gz)
    Source code(zip)
  • v1.9.0-M4(Mar 17, 2022)

    See the 1.9 migration guide for more information on replacing code deprecated in 1.9.

    :star: New Features / Enhancements

    • Deprecating core.instrument.binder and move classes to binder package #3043
    • Exemplars support for Prometheus Counter #2811
    • Be able to target classes and not only methods with TimedAspect #493
    • Prevent CompositeMeter allocating on each record #3059

    :lady_beetle: Bug Fixes

    • Dynatrace file-based configuration slow on macOS #3035

    :hammer: Dependency Upgrades

    • Upgrade to Reactor 2020.0.17 and Netty 4.1.75 #3084
    • Upgrade to Amazon AWS SDK 1.12.178 and 2.17.149 #3078
    • Upgrade to Mockito 4.4.0 #3077
    • Upgrade archunit to 0.23.1 and awaitility to 4.2.0 #3076
    • Upgrade to logback 1.2.11 #3075
    • Upgrade to Dropwizard Metrics 4.1.31 #3074

    :memo: Tasks

    • Unpin google-cloud-monitoring dependency #3081
    • Simplify tests after Dynatrace Metric Utils 1.5.0 release #3065
    • Move cache and http core classes back to core #3050
    • Add integration tests for Elasticsearch 8 #3037

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye, @pirgeo, @OleksiiBondar, @BrentDouglas
    Source code(tar.gz)
    Source code(zip)
  • v1.8.4(Mar 17, 2022)

    :star: New Features

    • Prevent CompositeMeter allocating on each record #3059

    :hammer: Dependency Upgrades

    • Upgrade to Reactor 2020.0.17 and Netty 4.1.75 #3084
    • Upgrade to Amazon AWS SDK 1.12.178 and 2.17.149 #3078
    • Upgrade to Mockito 4.4.0 #3077
    • Upgrade archunit to 0.23.1 and awaitility to 4.2.0 #3076
    • Upgrade to logback 1.2.11 #3075
    • Upgrade to Dropwizard Metrics 4.1.31 #3074

    :heart: Contributors

    We'd like to thank all the contributors who worked on this release!

    • @izeye, @OleksiiBondar, @BrentDouglas
    Source code(tar.gz)
    Source code(zip)
Owner
Micrometer Metrics
An application metrics facade for the most popular monitoring tools.
Micrometer Metrics
Java monitoring for the command-line, profiler included

jvmtop is a lightweight console application to monitor all accessible, running jvms on a machine. In a top-like manner, it displays JVM internal metri

null 1.2k Jan 6, 2023
JVM Profiler Sending Metrics to Kafka, Console Output or Custom Reporter

Uber JVM Profiler Uber JVM Profiler provides a Java Agent to collect various metrics and stacktraces for Hadoop/Spark JVM processes in a distributed w

Uber Common 1.7k Dec 22, 2022
Simple JVM Profiler Using StatsD and Other Metrics Backends

statsd-jvm-profiler statsd-jvm-profiler is a JVM agent profiler that sends profiling data to StatsD. Inspired by riemann-jvm-profiler, it was primaril

Etsy, Inc. 330 Oct 30, 2022
面向开发人员、声明式的 Metrics 采集与监控系统,可以对结构化与非结构化、有界数据与无界数据进行采集,通过对采集数据进行提取、过滤、逻辑运算等处理后将结果存储流行的监控系统或存储引擎中(如 Prometheus、Nightingale、Open-Falcon)从而搭建起完整的监控体系,同时也可以结合 grafana 完成数据的可视化

介绍 AnyMetrics - 面向开发人员、声明式的 Metrics 采集与监控系统,可以对结构化与非结构化、有界数据与无界数据进行采集,通过对采集数据进行提取、过滤、逻辑运算、聚合等处理后将结果存储流行的监控系统或存储引擎中(如 Prometheus、Nightingale、Open-Falco

lichao 6 Aug 16, 2021
A sidecar to run alongside Trino to gather metrics using the JMX connector and expose them in different formats using Apache velocity

Overview A sidecar to run alongside Trino to gather metrics using the JMX connector and expose them in different formats using Apache Velocity. Click

BlueCat Engineering 4 Nov 18, 2021
Performance visualisation tools

grav A collection of tools to help visualise process execution. This blog post has some detail on the rationale and implementation detail. Scheduler p

Mark Price 283 Dec 30, 2022
Tools for tracking down memory / JVM problems & generating predictable-as-possible VM behaviour

Hawkshaw Tools for tracking down memory / JVM problems & generating predictable-as-possible VM behaviour You can Use Hawkshaw to mimic application obj

Martijn Verburg 40 Jan 9, 2021
JVM Explorer is a Java desktop application for browsing loaded class files inside locally running Java Virtual Machines.

JVM Explorer JVM Explorer is a Java desktop application for browsing loaded class files inside locally running Java Virtual Machines. Features Browse

null 109 Nov 30, 2022
Popular Algorithms and Data Structures implemented in popular languages

Algos Community (college) maintained list of Algorithms and Data Structures implementations. Implemented Algorithms Algorithm C CPP Java Python Golang

IIIT Vadodara Open Source 1k Dec 28, 2022
Most popular Mocking framework for unit tests written in Java

Most popular mocking framework for Java Current version is 3.x Still on Mockito 1.x? See what's new in Mockito 2! Mockito 3 does not introduce any bre

mockito 13.6k Jan 9, 2023
🐀 Simple, Fast and easy to implement ORM for most popular databases

RatORM Simple, Fast and easy to implement ORM for most popular databases Status: Branch Tests Code Quality master Usefull links Helpful links: GitHub

Szczurowsky 3 Dec 25, 2022
Tree View; Mind map; Think map; tree map; custom view; 自定义; 树状图;思维导图;组织机构图;层次图

GysoTreeView 【中文】【English】 ⭐ If ok, give me a star ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ Tree View; Mind map; Think map; tree map; 树状图;思维导图;组织机构图;层次图;树型图 A custom tree view for

怪兽N 303 Dec 30, 2022
Adapts Java platform logging (System.Logger) to SLF4J 1.7.x.

avaje-slf4j-jpl Adapts Java platform logging (System.Logger) to SLF4J 1.7.x. Requires Java 11 or greater. Step 1. Add dependenc

avaje 1 Jan 18, 2022
Facsimile - Copy Your Most Used Text to Clipboard Easily with Facsimile!. It Helps You to Store You Most Used Text as a Key, Value Pair and Copy it to Clipboard with a Shortcut.

Facsimile An exact copy of Your Information ! Report Bug · Request Feature Table of Contents About The Project Built With Getting Started Installation

Sri lakshmi kanthan P 1 Sep 12, 2022
MessageEngine by afkvido. Alpha test is the most updated but may contain many bugs

MessageEngine Alpha Alpha Testing This is the most frequently updated, fresh, and potentially most glitchy version of MessageEngine. This version will

gemsvidø 3 Feb 7, 2022
Highly customized business metrics monitoring with TDengine & Spring Boot

Horus —— Highly customized business metrics monitoring with TDengine & Spring Boot 给予业务指标监控的高度定制自由 设计文档:https://akhnhwmr9k.feishu.cn/wiki/wikcnJJFmDHj

ArchLiu 6 Jun 17, 2022
Simple Logging Facade for Java

About SLF4J The Simple Logging Facade for Java (SLF4J) serves as a simple facade or abstraction for various logging frameworks (e.g. java.util.logging

QOS.CH Sarl 2.1k Jan 7, 2023
gRPC Facade for Transactional Keyvalue Stores

lionrock An implementation agnostic client/server communication protocol (using protobuf and grpc) inspired heavily by FoundationDB (https://github.co

Clement Pang 23 Dec 8, 2022
Winfoom is an HTTP(s) proxy server facade that allows applications to authenticate through the proxy without having to deal with the actual handshake.

winfoom Basic Proxy Facade for NTLM, Kerberos, SOCKS and Proxy Auto Config file proxies To help this project please give it a star ⭐ Overview Winfoom

Eugen Covaci 56 Dec 8, 2022