RestClient Observation Auto-Configuration (autoconfigure/RestClientObservationAutoConfiguration.java)

spring-boot · module/spring-boot-restclient/src/main/java/org/springframework/boot/restclient/autoconfigure/RestClientObservationAutoConfiguration.java · java · Apache-2.0
infra, integration, fw:spring, tag:restclient, tag:micrometer, tag:autoconfiguration

Auto-configures Micrometer observation support for Spring RestClient, adding a customizer when an ObservationRegistry is available. Reuse to enable metrics and tracing for outbound HTTP clients.

// Source: https://github.com/spring-projects/spring-boot | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/*
 * Copyright 2012-present the original author or authors.
 */

package org.springframework.boot.restclient.autoconfigure;

import io.micrometer.observation.ObservationRegistry;

import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.micrometer.obse

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key