Skip to content

Commit eb40686

Browse files
committed
Polish "Upgrade to Micrometer 1.7.0-M1"
See gh-25707
1 parent 7c5e050 commit eb40686

File tree

5 files changed

+4
-6
lines changed

5 files changed

+4
-6
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ dependencies {
5555
optional("io.micrometer:micrometer-registry-signalfx")
5656
optional("io.micrometer:micrometer-registry-statsd")
5757
optional("io.micrometer:micrometer-registry-wavefront")
58-
optional("org.hibernate:hibernate-micrometer")
5958
optional("io.projectreactor.netty:reactor-netty-http")
6059
optional("io.r2dbc:r2dbc-pool")
6160
optional("io.r2dbc:r2dbc-spi")
@@ -79,6 +78,7 @@ dependencies {
7978
optional("org.glassfish.jersey.core:jersey-server")
8079
optional("org.glassfish.jersey.containers:jersey-container-servlet-core")
8180
optional("org.hibernate:hibernate-core")
81+
optional("org.hibernate:hibernate-micrometer")
8282
optional("org.hibernate.validator:hibernate-validator")
8383
optional("org.influxdb:influxdb-java")
8484
optional("org.jolokia:jolokia-core")

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/orm/jpa/HibernateMetricsAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -48,7 +48,7 @@
4848
@Configuration(proxyBeanMethods = false)
4949
@AutoConfigureAfter({ MetricsAutoConfiguration.class, HibernateJpaAutoConfiguration.class,
5050
SimpleMetricsExportAutoConfiguration.class })
51-
@ConditionalOnClass({ EntityManagerFactory.class, SessionFactory.class, MeterRegistry.class })
51+
@ConditionalOnClass({ EntityManagerFactory.class, SessionFactory.class, HibernateMetrics.class, MeterRegistry.class })
5252
@ConditionalOnBean({ EntityManagerFactory.class, MeterRegistry.class })
5353
public class HibernateMetricsAutoConfiguration implements SmartInitializingSingleton {
5454

spring-boot-project/spring-boot-docs/src/docs/asciidoc/production-ready-features.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2355,7 +2355,7 @@ Each metric is tagged by the name of the Pool (can be controlled with `spring.da
23552355
23562356
[[production-ready-metrics-hibernate]]
23572357
==== Hibernate Metrics
2358-
Auto-configuration enables the instrumentation of all available Hibernate `EntityManagerFactory` instances that have statistics enabled with a metric named `hibernate`.
2358+
If `org.hibernate:hibernate-micrometer` is on the classpath, all available Hibernate `EntityManagerFactory` instances that have statistics enabled with a metric named `hibernate` are instrumented.
23592359
23602360
Metrics are also tagged by the name of the `EntityManagerFactory` that is derived from the bean name.
23612361

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-jpa/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ dependencies {
1111
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-actuator"))
1212

1313
runtimeOnly("com.h2database:h2")
14-
runtimeOnly("org.hibernate:hibernate-micrometer")
1514

1615
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
1716
}

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-flyway/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ dependencies {
1212

1313
runtimeOnly("com.h2database:h2")
1414
runtimeOnly("org.flywaydb:flyway-core")
15-
runtimeOnly("org.hibernate:hibernate-micrometer")
1615

1716
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
1817
}

0 commit comments

Comments
 (0)