Polish "Auto-configure observation for Spring-Batch"

See gh-34305
pull/35377/head
Stephane Nicoll 2 years ago
parent 5ad29db9c8
commit 579364c2ec

@ -1,10 +1,10 @@
plugins {
id "java-library"
id "java-library"
id "org.asciidoctor.jvm.convert"
id "org.springframework.boot.auto-configuration"
id "org.springframework.boot.conventions"
id "org.springframework.boot.deployed"
id "org.springframework.boot.optional-dependencies"
id "org.springframework.boot.optional-dependencies"
}
description = "Spring Boot Actuator AutoConfigure"

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2023 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.
@ -28,21 +28,20 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
import org.springframework.context.annotation.Bean;
/**
* {@link EnableAutoConfiguration Auto-configuration} for instrumentation of Spring Batch.
* Jobs
* {@link EnableAutoConfiguration Auto-configuration} for instrumentation of Spring Batch
* Jobs.
*
* @author Mark Bonnekessel
* @since 3.0.3
* @since 3.0.6
*/
@AutoConfiguration(after = ObservationAutoConfiguration.class)
@ConditionalOnBean(ObservationRegistry.class)
@ConditionalOnClass({ ObservationRegistry.class, BatchObservabilityBeanPostProcessor.class })
@SuppressWarnings("removal")
public class BatchObservationAutoConfiguration {
@ConditionalOnMissingBean
@Bean
public BatchObservabilityBeanPostProcessor batchObservabilityBeanPostProcessor() {
public static BatchObservabilityBeanPostProcessor batchObservabilityBeanPostProcessor() {
return new BatchObservabilityBeanPostProcessor();
}

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2023 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.
@ -15,6 +15,6 @@
*/
/**
* Auto-configuration for Spring Batcn observations.
* Auto-configuration for Spring Batch observations.
*/
package org.springframework.boot.actuate.autoconfigure.observation.batch;

@ -68,6 +68,7 @@ org.springframework.boot.actuate.autoconfigure.metrics.export.simple.SimpleMetri
org.springframework.boot.actuate.autoconfigure.metrics.export.stackdriver.StackdriverMetricsExportAutoConfiguration
org.springframework.boot.actuate.autoconfigure.metrics.export.statsd.StatsdMetricsExportAutoConfiguration
org.springframework.boot.actuate.autoconfigure.metrics.export.wavefront.WavefrontMetricsExportAutoConfiguration
org.springframework.boot.actuate.autoconfigure.observation.batch.BatchObservationAutoConfiguration
org.springframework.boot.actuate.autoconfigure.observation.graphql.GraphQlObservationAutoConfiguration
org.springframework.boot.actuate.autoconfigure.metrics.integration.IntegrationMetricsAutoConfiguration
org.springframework.boot.actuate.autoconfigure.metrics.jdbc.DataSourcePoolMetricsAutoConfiguration

@ -25,6 +25,11 @@ import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link BatchObservationAutoConfiguration}.
*
* @author Mark Bonnekessel
*/
class BatchObservationAutoConfigurationTests {
private final ApplicationContextRunner contextRunner = new ApplicationContextRunner()

@ -858,12 +858,22 @@ NOTE: Only caches that are configured on startup are bound to the registry.
For caches not defined in the caches configuration, such as caches created on the fly or programmatically after the startup phase, an explicit registration is required.
A `CacheMetricsRegistrar` bean is made available to make that process easier.
[[actuator.metrics.supported.spring-batch]]
==== Spring Batch Metrics
See the {spring-batch-docs}monitoring-and-metrics.html[Spring Batch reference documentation].
[[actuator.metrics.supported.spring-graphql]]
==== Spring GraphQL Metrics
See the {spring-graphql-docs}[Spring GraphQL reference documentation].
[[actuator.metrics.supported.jdbc]]
==== DataSource Metrics
Auto-configuration enables the instrumentation of all available `DataSource` objects with metrics prefixed with `jdbc.connections`.

Loading…
Cancel
Save