@ -101,7 +101,8 @@ public class BackgroundPreinitializer implements ApplicationListener<SpringAppli
@@ -101,7 +101,8 @@ public class BackgroundPreinitializer implements ApplicationListener<SpringAppli
runSafely(newConversionServiceInitializer());
runSafely(newValidationInitializer());
if(!runSafely(newMessageConverterInitializer())){
// If the MessageConverterInitializer we still might be able to
// If the MessageConverterInitializer fails to run, we still might
@ -768,7 +768,7 @@ By default, Spring MVC related metrics are tagged with the following information
@@ -768,7 +768,7 @@ By default, Spring MVC related metrics are tagged with the following information
| The request's URI template prior to variable substitution, if possible (for example, `/api/person/\{id}`)
|===
To add to the default tags, provide a `@Bean` that extends `DefaultServerRequestObservationConvention` from the `org.springframework.http.observation` package.
To add to the default tags, provide a `@Bean` that extends `DefaultServerRequestObservationConvention` from the `org.springframework.http.server.observation` package.
To replace the default tags, provide a `@Bean` that implements `ServerRequestObservationConvention`.
@ -808,7 +808,7 @@ By default, WebFlux related metrics are tagged with the following information:
@@ -808,7 +808,7 @@ By default, WebFlux related metrics are tagged with the following information:
| The request's URI template prior to variable substitution, if possible (for example, `/api/person/\{id}`)
|===
To add to the default tags, provide a `@Bean` that extends `DefaultServerRequestObservationConvention` from the `org.springframework.http.observation.reactive` package.
To add to the default tags, provide a `@Bean` that extends `DefaultServerRequestObservationConvention` from the `org.springframework.http.server.reactive.observation` package.
To replace the default tags, provide a `@Bean` that implements `ServerRequestObservationConvention`.
TIP: In some cases, exceptions handled in controllers and handler functions are not recorded as request metrics tags.
@ -17,7 +17,7 @@ Spring Boot ships auto-configuration for the following tracers:
@@ -17,7 +17,7 @@ Spring Boot ships auto-configuration for the following tracers:
[[actuator.micrometer-tracing.getting-started]]
=== Getting Started
We need an example application that we can use to getting started with tracing.
We need an example application that we can use to get started with tracing.
For our purposes, the simple "`Hello World!`" web application that's covered in the "`<<getting-started#getting-started.first-application>>`" section will suffice.
We're going to use the OpenTelemetry tracer with Zipkin as trace backend.
@ -77,7 +77,7 @@ All tracer implementations need the `org.springframework.boot:spring-boot-starte
@@ -77,7 +77,7 @@ All tracer implementations need the `org.springframework.boot:spring-boot-starte
* `io.micrometer:micrometer-tracing-bridge-otel` - which is needed to bride the Micrometer Observation API to OpenTelemetry.
* `io.micrometer:micrometer-tracing-bridge-otel` - which is needed to bridge the Micrometer Observation API to OpenTelemetry.
* `io.opentelemetry:opentelemetry-exporter-zipkin` - which is needed to report traces to Zipkin.
@ -85,7 +85,7 @@ All tracer implementations need the `org.springframework.boot:spring-boot-starte
@@ -85,7 +85,7 @@ All tracer implementations need the `org.springframework.boot:spring-boot-starte
You can then use `@ImportRuntimeHints` on any `@Configuration` class (for example your `@SpringBootApplication` annotated application class) to activate those hints.
If you have classes which needs binding (mostly needed when serializing or deserializing JSON), you can use {spring-framework-docs}/core.html#aot-hints-register-reflection-for-binding[`@RegisterReflectionForBinding`] on any bean.
If you have classes which need binding (mostly needed when serializing or deserializing JSON), you can use {spring-framework-docs}/core.html#aot-hints-register-reflection-for-binding[`@RegisterReflectionForBinding`] on any bean.
Most of the hints are automatically inferred, for example when accepting or returning data from a `@RestController` method.
But when you work with `WebClient` or `RestTemplate` directly, you might need to use `RegisterReflectionForBinding`.
But when you work with `WebClient` or `RestTemplate` directly, you might need to use `@RegisterReflectionForBinding`.