Polish "Upgrade to Micrometer 1.7.0-M1"

See gh-25707
This commit is contained in:
Stephane Nicoll 2021-03-17 11:28:52 +01:00
parent 7c5e0505d8
commit eb406867ea
5 changed files with 4 additions and 6 deletions

View File

@ -55,7 +55,6 @@ dependencies {
optional("io.micrometer:micrometer-registry-signalfx")
optional("io.micrometer:micrometer-registry-statsd")
optional("io.micrometer:micrometer-registry-wavefront")
optional("org.hibernate:hibernate-micrometer")
optional("io.projectreactor.netty:reactor-netty-http")
optional("io.r2dbc:r2dbc-pool")
optional("io.r2dbc:r2dbc-spi")
@ -79,6 +78,7 @@ dependencies {
optional("org.glassfish.jersey.core:jersey-server")
optional("org.glassfish.jersey.containers:jersey-container-servlet-core")
optional("org.hibernate:hibernate-core")
optional("org.hibernate:hibernate-micrometer")
optional("org.hibernate.validator:hibernate-validator")
optional("org.influxdb:influxdb-java")
optional("org.jolokia:jolokia-core")

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -48,7 +48,7 @@ import org.springframework.util.StringUtils;
@Configuration(proxyBeanMethods = false)
@AutoConfigureAfter({ MetricsAutoConfiguration.class, HibernateJpaAutoConfiguration.class,
SimpleMetricsExportAutoConfiguration.class })
@ConditionalOnClass({ EntityManagerFactory.class, SessionFactory.class, MeterRegistry.class })
@ConditionalOnClass({ EntityManagerFactory.class, SessionFactory.class, HibernateMetrics.class, MeterRegistry.class })
@ConditionalOnBean({ EntityManagerFactory.class, MeterRegistry.class })
public class HibernateMetricsAutoConfiguration implements SmartInitializingSingleton {

View File

@ -2355,7 +2355,7 @@ Each metric is tagged by the name of the Pool (can be controlled with `spring.da
[[production-ready-metrics-hibernate]]
==== Hibernate Metrics
Auto-configuration enables the instrumentation of all available Hibernate `EntityManagerFactory` instances that have statistics enabled with a metric named `hibernate`.
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.
Metrics are also tagged by the name of the `EntityManagerFactory` that is derived from the bean name.

View File

@ -11,7 +11,6 @@ dependencies {
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-actuator"))
runtimeOnly("com.h2database:h2")
runtimeOnly("org.hibernate:hibernate-micrometer")
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
}

View File

@ -12,7 +12,6 @@ dependencies {
runtimeOnly("com.h2database:h2")
runtimeOnly("org.flywaydb:flyway-core")
runtimeOnly("org.hibernate:hibernate-micrometer")
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
}