parent
7875aaa308
commit
18bde1852f
|
@ -166,6 +166,7 @@ include "spring-boot-project:spring-boot-tools:spring-boot-maven-plugin"
|
|||
include "spring-boot-project:spring-boot-tools:spring-boot-properties-migrator"
|
||||
include "spring-boot-project:spring-boot-tools:spring-boot-test-support"
|
||||
include "spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"
|
||||
include "spring-boot-project:spring-boot-tracing"
|
||||
include "spring-boot-project:spring-boot-tx"
|
||||
include "spring-boot-project:spring-boot-undertow"
|
||||
include "spring-boot-project:spring-boot-validation"
|
||||
|
|
|
@ -75,14 +75,7 @@ dependencies {
|
|||
optional("io.lettuce:lettuce-core")
|
||||
optional("io.micrometer:micrometer-jakarta9")
|
||||
optional("io.micrometer:micrometer-observation")
|
||||
optional("io.micrometer:micrometer-tracing")
|
||||
optional("io.micrometer:micrometer-tracing-bridge-brave")
|
||||
optional("io.micrometer:micrometer-tracing-bridge-otel")
|
||||
optional("io.zipkin.reporter2:zipkin-reporter-brave")
|
||||
optional("io.opentelemetry:opentelemetry-exporter-zipkin")
|
||||
optional("io.opentelemetry:opentelemetry-exporter-otlp")
|
||||
optional("io.projectreactor.netty:reactor-netty-http")
|
||||
optional("io.prometheus:prometheus-metrics-tracer-common")
|
||||
optional("jakarta.persistence:jakarta.persistence-api")
|
||||
optional("jakarta.servlet:jakarta.servlet-api")
|
||||
optional("org.apache.activemq:activemq-broker")
|
||||
|
@ -123,10 +116,7 @@ dependencies {
|
|||
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-web-server")))
|
||||
testImplementation("com.squareup.okhttp3:mockwebserver")
|
||||
testImplementation("io.micrometer:micrometer-observation-test")
|
||||
testImplementation("io.micrometer:micrometer-registry-prometheus")
|
||||
testImplementation("io.opentelemetry:opentelemetry-exporter-common")
|
||||
testImplementation("io.projectreactor:reactor-test")
|
||||
testImplementation("io.prometheus:prometheus-metrics-exposition-formats")
|
||||
testImplementation("jakarta.xml.bind:jakarta.xml.bind-api")
|
||||
testImplementation("org.apache.activemq:artemis-jakarta-client")
|
||||
testImplementation("org.apache.activemq:artemis-jakarta-server")
|
||||
|
@ -141,7 +131,6 @@ dependencies {
|
|||
testImplementation("org.springframework.security:spring-security-test")
|
||||
testImplementation("org.yaml:snakeyaml")
|
||||
|
||||
testRuntimeOnly("io.grpc:grpc-api:1.72.0")
|
||||
testRuntimeOnly("jakarta.management.j2ee:jakarta.management.j2ee-api")
|
||||
testRuntimeOnly("jakarta.transaction:jakarta.transaction-api")
|
||||
testRuntimeOnly("org.opensaml:opensaml-core:4.0.1")
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012-present 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
|
||||
/**
|
||||
* {@link EnableAutoConfiguration Auto-configuration} for OpenTelemetry tracing.
|
||||
*
|
||||
* @author Moritz Halbritter
|
||||
* @author Marcin Grzejszczak
|
||||
* @author Yanming Zhou
|
||||
* @since 3.0.0
|
||||
* @deprecated since 3.4.0 in favor of {@link OpenTelemetryTracingAutoConfiguration}
|
||||
*/
|
||||
@Deprecated(since = "3.4.0", forRemoval = true)
|
||||
public class OpenTelemetryAutoConfiguration {
|
||||
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012-present 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.otlp;
|
||||
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
|
||||
/**
|
||||
* {@link EnableAutoConfiguration Auto-configuration} for exporting traces with OTLP.
|
||||
*
|
||||
* @author Jonatan Ivanov
|
||||
* @author Moritz Halbritter
|
||||
* @author Eddú Meléndez
|
||||
* @since 3.1.0
|
||||
* @deprecated since 3.4.0 in favor of {@link OtlpTracingAutoConfiguration}
|
||||
*/
|
||||
@Deprecated(since = "3.4.0", forRemoval = true)
|
||||
public class OtlpAutoConfiguration {
|
||||
|
||||
}
|
|
@ -7,11 +7,6 @@
|
|||
"description": "Whether to enable SSL certificate health check.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "management.otlp.tracing.export.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether auto-configuration of tracing is enabled to export OTLP traces."
|
||||
},
|
||||
{
|
||||
"name": "management.promethus.metrics.export.pushgateway.base-url",
|
||||
"type": "java.lang.String",
|
||||
|
@ -19,31 +14,6 @@
|
|||
"level": "error",
|
||||
"replacement": "management.prometheus.metrics.export.pushgateway.address"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "management.tracing.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether auto-configuration of tracing is enabled to export and propagate traces.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "management.tracing.propagation.consume",
|
||||
"defaultValue": [
|
||||
"W3C",
|
||||
"B3",
|
||||
"B3_MULTI"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "management.tracing.propagation.produce",
|
||||
"defaultValue": [
|
||||
"W3C"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "management.zipkin.tracing.export.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether auto-configuration of tracing is enabled to export Zipkin traces."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryEventPublisherBeansTestExecutionListener
|
|
@ -1,7 +0,0 @@
|
|||
# Environment Post Processors
|
||||
org.springframework.boot.env.EnvironmentPostProcessor=\
|
||||
org.springframework.boot.actuate.autoconfigure.tracing.LogCorrelationEnvironmentPostProcessor
|
||||
|
||||
# Application Listeners
|
||||
org.springframework.context.ApplicationListener=\
|
||||
org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryEventPublisherBeansApplicationListener
|
|
@ -1,9 +1,2 @@
|
|||
org.springframework.boot.actuate.autoconfigure.security.reactive.ReactiveManagementWebSecurityAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.tracing.BraveAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.tracing.MicrometerTracingAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.tracing.NoopTracerAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryTracingAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.tracing.prometheus.PrometheusExemplarsAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinTracingAutoConfiguration
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryAutoConfiguration=org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryTracingAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpAutoConfiguration=org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingAutoConfiguration
|
|
@ -19,8 +19,6 @@ package org.springframework.boot.actuate.autoconfigure.integrationtest;
|
|||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.SpringBootConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.BraveAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryTracingAutoConfiguration;
|
||||
import org.springframework.boot.actuate.health.HealthEndpointWebExtension;
|
||||
import org.springframework.boot.actuate.health.ReactiveHealthEndpointWebExtension;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
|
@ -57,18 +55,17 @@ class WebEndpointsAutoConfigurationIntegrationTests {
|
|||
private WebApplicationContextRunner servletWebRunner() {
|
||||
return new WebApplicationContextRunner()
|
||||
.withConfiguration(UserConfigurations.of(WebEndpointTestApplication.class))
|
||||
.withPropertyValues("management.tracing.enabled=false", "management.defaults.metrics.export.enabled=false");
|
||||
.withPropertyValues("management.defaults.metrics.export.enabled=false");
|
||||
}
|
||||
|
||||
private ReactiveWebApplicationContextRunner reactiveWebRunner() {
|
||||
return new ReactiveWebApplicationContextRunner()
|
||||
.withConfiguration(UserConfigurations.of(WebEndpointTestApplication.class))
|
||||
.withPropertyValues("management.tracing.enabled=false", "management.defaults.metrics.export.enabled=false");
|
||||
.withPropertyValues("management.defaults.metrics.export.enabled=false");
|
||||
}
|
||||
|
||||
@EnableAutoConfiguration(exclude = { CassandraAutoConfiguration.class, CassandraDataAutoConfiguration.class,
|
||||
RepositoryRestMvcAutoConfiguration.class, BraveAutoConfiguration.class,
|
||||
OpenTelemetryTracingAutoConfiguration.class })
|
||||
RepositoryRestMvcAutoConfiguration.class })
|
||||
@SpringBootConfiguration
|
||||
static class WebEndpointTestApplication {
|
||||
|
||||
|
|
|
@ -2134,6 +2134,7 @@ bom {
|
|||
"spring-boot-testcontainers-all",
|
||||
"spring-boot-thymeleaf",
|
||||
"spring-boot-tomcat",
|
||||
"spring-boot-tracing",
|
||||
"spring-boot-tx",
|
||||
"spring-boot-undertow",
|
||||
"spring-boot-validation",
|
||||
|
|
|
@ -72,6 +72,7 @@ dependencies {
|
|||
optional(project(":spring-boot-project:spring-boot-opentelemetry"))
|
||||
optional(project(":spring-boot-project:spring-boot-pulsar"))
|
||||
optional(project(":spring-boot-project:spring-boot-r2dbc"))
|
||||
optional(project(":spring-boot-project:spring-boot-tracing"))
|
||||
optional(project(":spring-boot-project:spring-boot-zipkin"))
|
||||
optional("com.hazelcast:hazelcast")
|
||||
optional("org.mongodb:mongodb-driver-core")
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
package org.springframework.boot.docker.compose.service.connection.otlp;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.Transport;
|
||||
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.Transport;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
package org.springframework.boot.docker.compose.service.connection.otlp;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.Transport;
|
||||
import org.springframework.boot.docker.compose.service.connection.test.DockerComposeTest;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.Transport;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
|
||||
package org.springframework.boot.docker.compose.service.connection.otlp;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.Transport;
|
||||
import org.springframework.boot.docker.compose.core.RunningService;
|
||||
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory;
|
||||
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.Transport;
|
||||
|
||||
/**
|
||||
* {@link DockerComposeConnectionDetailsFactory} to create
|
||||
|
@ -41,7 +41,7 @@ class OpenTelemetryTracingDockerComposeConnectionDetailsFactory
|
|||
|
||||
OpenTelemetryTracingDockerComposeConnectionDetailsFactory() {
|
||||
super(OPENTELEMETRY_IMAGE_NAMES,
|
||||
"org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingAutoConfiguration");
|
||||
"org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingAutoConfiguration");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -151,6 +151,7 @@ dependencies {
|
|||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-testcontainers", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-thymeleaf", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-tomcat", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-tracing", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-tx", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-undertow", configuration: "autoConfigurationMetadata"))
|
||||
autoConfiguration(project(path: ":spring-boot-project:spring-boot-validation", configuration: "autoConfigurationMetadata"))
|
||||
|
@ -238,6 +239,7 @@ dependencies {
|
|||
configurationProperties(project(path: ":spring-boot-project:spring-boot-testcontainers", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-thymeleaf", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-tomcat", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-tracing", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-tx", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-undertow", configuration: "configurationPropertiesMetadata"))
|
||||
configurationProperties(project(path: ":spring-boot-project:spring-boot-web-server", configuration: "configurationPropertiesMetadata"))
|
||||
|
|
|
@ -138,7 +138,7 @@ Tracing with OpenTelemetry and reporting using OTLP requires the following depen
|
|||
|
||||
Use the `management.otlp.tracing.*` configuration properties to configure reporting using OTLP.
|
||||
|
||||
NOTE: If you need to apply advanced customizations to OTLP span exporters, consider registering javadoc:org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpHttpSpanExporterBuilderCustomizer[] or javadoc:org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpGrpcSpanExporterBuilderCustomizer[] beans.
|
||||
NOTE: If you need to apply advanced customizations to OTLP span exporters, consider registering javadoc:org.springframework.boot.tracing.autoconfigure.otlp.OtlpHttpSpanExporterBuilderCustomizer[] or javadoc:org.springframework.boot.tracing.autoconfigure.otlp.OtlpGrpcSpanExporterBuilderCustomizer[] beans.
|
||||
These will be invoked before the creation of the `OtlpHttpSpanExporter` or `OtlpGrpcSpanExporter`.
|
||||
The customizers take precedence over anything applied by the auto-configuration.
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ The following service connections are currently supported:
|
|||
| javadoc:org.springframework.boot.metrics.autoconfigure.export.otlp.OtlpMetricsConnectionDetails[]
|
||||
| Containers named "otel/opentelemetry-collector-contrib", "grafana/otel-lgtm"
|
||||
|
||||
| javadoc:org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingConnectionDetails[]
|
||||
| javadoc:org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingConnectionDetails[]
|
||||
| Containers named "otel/opentelemetry-collector-contrib", "grafana/otel-lgtm"
|
||||
|
||||
| javadoc:org.springframework.boot.autoconfigure.pulsar.PulsarConnectionDetails[]
|
||||
|
@ -131,7 +131,7 @@ The following service connections are currently supported:
|
|||
| javadoc:org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails[]
|
||||
| Containers named "redis", "bitnami/redis", "redis/redis-stack" or "redis/redis-stack-server"
|
||||
|
||||
| javadoc:org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinConnectionDetails[]
|
||||
| javadoc:org.springframework.boot.tracing.autoconfigure.zipkin.ZipkinConnectionDetails[]
|
||||
| Containers named "openzipkin/zipkin".
|
||||
|===
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ Regardless of your classpath, tracing components which are reporting data are no
|
|||
|
||||
If you need those components as part of an integration test, annotate the test with javadoc:org.springframework.boot.test.autoconfigure.actuate.observability.AutoConfigureObservability[format=annotation].
|
||||
|
||||
If you have created your own reporting components (e.g. a custom javadoc:io.opentelemetry.sdk.trace.export.SpanExporter[] or `brave.handler.SpanHandler`) and you don't want them to be active in tests, you can use the javadoc:org.springframework.boot.actuate.autoconfigure.tracing.ConditionalOnEnabledTracing[format=annotation] annotation to disable them.
|
||||
If you have created your own reporting components (e.g. a custom javadoc:io.opentelemetry.sdk.trace.export.SpanExporter[] or `brave.handler.SpanHandler`) and you don't want them to be active in tests, you can use the javadoc:org.springframework.boot.tracing.autoconfigure.ConditionalOnEnabledTracing[format=annotation] annotation to disable them.
|
||||
|
||||
If you annotate xref:testing/spring-boot-applications.adoc#testing.spring-boot-applications.autoconfigured-tests[a sliced test] with javadoc:org.springframework.boot.test.autoconfigure.actuate.observability.AutoConfigureObservability[format=annotation], it auto-configures a no-op javadoc:io.micrometer.tracing.Tracer[].
|
||||
Data exporting in sliced tests is not supported with the javadoc:org.springframework.boot.test.autoconfigure.actuate.observability.AutoConfigureObservability[format=annotation] annotation.
|
||||
|
|
|
@ -161,7 +161,7 @@ The following service connection factories are provided in the `spring-boot-test
|
|||
| javadoc:org.springframework.boot.metrics.autoconfigure.export.otlp.OtlpMetricsConnectionDetails[]
|
||||
| Containers named "otel/opentelemetry-collector-contrib" or of type javadoc:org.testcontainers.grafana.LgtmStackContainer[]
|
||||
|
||||
| javadoc:org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingConnectionDetails[]
|
||||
| javadoc:org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingConnectionDetails[]
|
||||
| Containers named "otel/opentelemetry-collector-contrib" or of type javadoc:org.testcontainers.grafana.LgtmStackContainer[]
|
||||
|
||||
| javadoc:org.springframework.boot.autoconfigure.pulsar.PulsarConnectionDetails[]
|
||||
|
@ -179,7 +179,7 @@ javadoc:org.testcontainers.oracle.OracleContainer[OracleContainer (free)], javad
|
|||
| javadoc:org.springframework.boot.data.redis.autoconfigure.RedisConnectionDetails[]
|
||||
| Containers of type javadoc:com.redis.testcontainers.RedisContainer[] or javadoc:com.redis.testcontainers.RedisStackContainer[], or containers named "redis", "redis/redis-stack" or "redis/redis-stack-server"
|
||||
|
||||
| javadoc:org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinConnectionDetails[]
|
||||
| javadoc:org.springframework.boot.tracing.autoconfigure.zipkin.ZipkinConnectionDetails[]
|
||||
| Containers named "openzipkin/zipkin"
|
||||
|===
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ description = "Starter for using Spring Boot's Actuator which provides productio
|
|||
dependencies {
|
||||
api(project(":spring-boot-project:spring-boot-actuator-autoconfigure-all"))
|
||||
api(project(":spring-boot-project:spring-boot-metrics"))
|
||||
api(project(":spring-boot-project:spring-boot-tracing"))
|
||||
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
|
||||
api("io.micrometer:micrometer-observation")
|
||||
api("io.micrometer:micrometer-jakarta9")
|
||||
|
|
|
@ -98,6 +98,7 @@ dependencies {
|
|||
optional(project(":spring-boot-project:spring-boot-security-oauth2-client"))
|
||||
optional(project(":spring-boot-project:spring-boot-security-oauth2-resource-server"))
|
||||
optional(project(":spring-boot-project:spring-boot-security-saml2"))
|
||||
optional(project(":spring-boot-project:spring-boot-tracing"))
|
||||
optional(project(":spring-boot-project:spring-boot-tx"))
|
||||
optional(project(":spring-boot-project:spring-boot-validation"))
|
||||
optional(project(":spring-boot-project:spring-boot-web-server-test"))
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
org.springframework.boot.observation.autoconfigure.ObservationAutoConfiguration
|
||||
|
||||
# Metrics
|
||||
org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration
|
||||
org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration
|
||||
org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration
|
||||
optional:org.springframework.boot.metrics.autoconfigure.export.simple.SimpleMetricsExportAutoConfiguration
|
||||
optional:org.springframework.boot.metrics.autoconfigure.CompositeMeterRegistryAutoConfiguration
|
||||
optional:org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration
|
||||
|
||||
# Tracing
|
||||
org.springframework.boot.actuate.autoconfigure.tracing.NoopTracerAutoConfiguration
|
||||
org.springframework.boot.actuate.autoconfigure.tracing.MicrometerTracingAutoConfiguration
|
||||
optional:org.springframework.boot.tracing.autoconfigure.NoopTracerAutoConfiguration
|
||||
optional:org.springframework.boot.tracing.autoconfigure.MicrometerTracingAutoConfiguration
|
||||
|
|
|
@ -46,6 +46,7 @@ dependencies {
|
|||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure-all"))
|
||||
optional(project(":spring-boot-project:spring-boot-metrics"))
|
||||
optional(project(":spring-boot-project:spring-boot-opentelemetry"))
|
||||
optional(project(":spring-boot-project:spring-boot-tracing"))
|
||||
optional(project(":spring-boot-project:spring-boot-tx"))
|
||||
optional(project(":spring-boot-project:spring-boot-zipkin"))
|
||||
optional("org.springframework:spring-test")
|
||||
|
|
|
@ -22,12 +22,12 @@ import org.testcontainers.junit.jupiter.Container;
|
|||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.Transport;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingAutoConfiguration;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.Transport;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
|
||||
|
||||
|
|
|
@ -22,12 +22,12 @@ import org.testcontainers.junit.jupiter.Container;
|
|||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.opentelemetry.actuate.autoconfigure.logging.OpenTelemetryLoggingConnectionDetails;
|
||||
import org.springframework.boot.opentelemetry.actuate.autoconfigure.logging.Transport;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingAutoConfiguration;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
|
||||
|
||||
|
|
|
@ -22,12 +22,12 @@ import org.testcontainers.junit.jupiter.Container;
|
|||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.Transport;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingAutoConfiguration;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.Transport;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
|
||||
|
||||
|
|
|
@ -18,11 +18,11 @@ package org.springframework.boot.testcontainers.service.connection.otlp;
|
|||
|
||||
import org.testcontainers.grafana.LgtmStackContainer;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.Transport;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.Transport;
|
||||
|
||||
/**
|
||||
* {@link ContainerConnectionDetailsFactory} to create
|
||||
|
@ -36,8 +36,7 @@ class GrafanaOpenTelemetryTracingContainerConnectionDetailsFactory
|
|||
extends ContainerConnectionDetailsFactory<LgtmStackContainer, OtlpTracingConnectionDetails> {
|
||||
|
||||
GrafanaOpenTelemetryTracingContainerConnectionDetailsFactory() {
|
||||
super(ANY_CONNECTION_NAME,
|
||||
"org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingAutoConfiguration");
|
||||
super(ANY_CONNECTION_NAME, "org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingAutoConfiguration");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,11 +19,11 @@ package org.springframework.boot.testcontainers.service.connection.otlp;
|
|||
import org.testcontainers.containers.Container;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.Transport;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionDetailsFactory;
|
||||
import org.springframework.boot.testcontainers.service.connection.ContainerConnectionSource;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.Transport;
|
||||
|
||||
/**
|
||||
* {@link ContainerConnectionDetailsFactory} to create
|
||||
|
@ -42,7 +42,7 @@ class OpenTelemetryTracingContainerConnectionDetailsFactory
|
|||
|
||||
OpenTelemetryTracingContainerConnectionDetailsFactory() {
|
||||
super("otel/opentelemetry-collector-contrib",
|
||||
"org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingAutoConfiguration");
|
||||
"org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingAutoConfiguration");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* Copyright 2012-present 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
plugins {
|
||||
id "java-library"
|
||||
id "org.springframework.boot.auto-configuration"
|
||||
id "org.springframework.boot.configuration-properties"
|
||||
id "org.springframework.boot.deployed"
|
||||
id "org.springframework.boot.optional-dependencies"
|
||||
}
|
||||
|
||||
description = "Spring Boot Tracing"
|
||||
|
||||
dependencies {
|
||||
api(project(":spring-boot-project:spring-boot"))
|
||||
api(project(":spring-boot-project:spring-boot-observation"))
|
||||
api("io.micrometer:micrometer-tracing") {
|
||||
exclude(group: "aopalliance", module: "aopalliance")
|
||||
}
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-metrics"))
|
||||
optional("io.micrometer:micrometer-core")
|
||||
optional("io.micrometer:micrometer-tracing-bridge-brave")
|
||||
optional("io.micrometer:micrometer-tracing-bridge-otel")
|
||||
optional("io.opentelemetry:opentelemetry-exporter-zipkin")
|
||||
optional("io.opentelemetry:opentelemetry-exporter-otlp")
|
||||
optional("io.prometheus:prometheus-metrics-tracer-common")
|
||||
optional("io.zipkin.reporter2:zipkin-reporter-brave")
|
||||
optional("org.aspectj:aspectjweaver")
|
||||
optional("org.junit.platform:junit-platform-launcher")
|
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-opentelemetry"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-zipkin"))
|
||||
testImplementation("com.squareup.okhttp3:mockwebserver")
|
||||
testImplementation("io.micrometer:micrometer-registry-prometheus")
|
||||
testImplementation("io.opentelemetry:opentelemetry-exporter-common")
|
||||
testImplementation("io.prometheus:prometheus-metrics-exposition-formats")
|
||||
testImplementation("org.eclipse.jetty.ee10:jetty-ee10-webapp")
|
||||
testImplementation("org.eclipse.jetty.http2:jetty-http2-server")
|
||||
|
||||
testRuntimeOnly("ch.qos.logback:logback-classic")
|
||||
testRuntimeOnly("io.grpc:grpc-api:1.72.0")
|
||||
}
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -41,13 +41,13 @@ import io.micrometer.tracing.exporter.SpanFilter;
|
|||
import io.micrometer.tracing.exporter.SpanReporter;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.TracingProperties.Propagation.PropagationType;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.IncompatibleConfigurationException;
|
||||
import org.springframework.boot.tracing.autoconfigure.TracingProperties.Propagation.PropagationType;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.core.Ordered;
|
||||
|
@ -60,7 +60,7 @@ import org.springframework.core.env.Environment;
|
|||
* @author Moritz Halbritter
|
||||
* @author Marcin Grzejszczak
|
||||
* @author Jonatan Ivanov
|
||||
* @since 3.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(before = { MicrometerTracingAutoConfiguration.class, NoopTracerAutoConfiguration.class })
|
||||
@ConditionalOnClass({ Tracer.class, BraveTracer.class })
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -33,10 +33,10 @@ import brave.propagation.Propagation.Factory;
|
|||
import io.micrometer.tracing.brave.bridge.BraveBaggageManager;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.TracingProperties.Baggage.Correlation;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBooleanProperty;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.tracing.autoconfigure.TracingProperties.Baggage.Correlation;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.annotation.Order;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -30,7 +30,7 @@ import brave.propagation.TraceContextOrSamplingFlags;
|
|||
import io.micrometer.tracing.BaggageManager;
|
||||
import io.micrometer.tracing.brave.bridge.W3CPropagation;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.TracingProperties.Propagation.PropagationType;
|
||||
import org.springframework.boot.tracing.autoconfigure.TracingProperties.Propagation.PropagationType;
|
||||
|
||||
/**
|
||||
* {@link brave.propagation.Propagation.Factory Propagation factory} which supports
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
@ -33,7 +33,7 @@ import io.opentelemetry.context.propagation.TextMapPropagator;
|
|||
import io.opentelemetry.context.propagation.TextMapSetter;
|
||||
import io.opentelemetry.extension.trace.propagation.B3Propagator;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.TracingProperties.Propagation.PropagationType;
|
||||
import org.springframework.boot.tracing.autoconfigure.TracingProperties.Propagation.PropagationType;
|
||||
|
||||
/**
|
||||
* {@link TextMapPropagator} which supports multiple tracing formats. It is able to
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
|
@ -33,7 +33,7 @@ import org.springframework.context.annotation.Conditional;
|
|||
* property takes precedence over the global property.
|
||||
*
|
||||
* @author Moritz Halbritter
|
||||
* @since 3.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ ElementType.TYPE, ElementType.METHOD })
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.env.EnvironmentPostProcessor;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import io.micrometer.common.annotation.ValueExpressionResolver;
|
||||
import io.micrometer.tracing.Tracer;
|
||||
|
@ -54,7 +54,7 @@ import org.springframework.util.ClassUtils;
|
|||
*
|
||||
* @author Moritz Halbritter
|
||||
* @author Jonatan Ivanov
|
||||
* @since 3.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnBean(Tracer.class)
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import io.micrometer.tracing.Tracer;
|
||||
|
||||
|
@ -29,7 +29,7 @@ import org.springframework.context.annotation.Bean;
|
|||
* {@link Tracer}.
|
||||
*
|
||||
* @author Moritz Halbritter
|
||||
* @since 3.2.1
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(before = MicrometerTracingAutoConfiguration.class)
|
||||
@ConditionalOnClass(Tracer.class)
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
@ -48,7 +48,7 @@ import org.springframework.util.MultiValueMap;
|
|||
* {@link ApplicationStartingEvent} isn't called early enough or isn't fired.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 3.4.0
|
||||
* @since 4.0.0
|
||||
* @see OpenTelemetryEventPublisherBeansTestExecutionListener
|
||||
*/
|
||||
public class OpenTelemetryEventPublisherBeansApplicationListener implements GenericApplicationListener {
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import org.junit.platform.launcher.TestExecutionListener;
|
||||
import org.junit.platform.launcher.TestIdentifier;
|
||||
|
@ -25,7 +25,7 @@ import org.junit.platform.launcher.TestIdentifier;
|
|||
* early as possible.
|
||||
*
|
||||
* @author Phillip Webb
|
||||
* @since 3.4.0
|
||||
* @since 4.0.0
|
||||
* @see OpenTelemetryEventPublisherBeansApplicationListener
|
||||
*/
|
||||
public class OpenTelemetryEventPublisherBeansTestExecutionListener implements TestExecutionListener {
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -64,7 +64,7 @@ import org.springframework.util.CollectionUtils;
|
|||
* @author Moritz Halbritter
|
||||
* @author Marcin Grzejszczak
|
||||
* @author Yanming Zhou
|
||||
* @since 3.4.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(before = { MicrometerTracingAutoConfiguration.class, NoopTracerAutoConfiguration.class })
|
||||
@ConditionalOnClass({ OtelTracer.class, SdkTracerProvider.class, OpenTelemetry.class })
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import io.opentelemetry.sdk.trace.SdkTracerProvider;
|
||||
import io.opentelemetry.sdk.trace.SdkTracerProviderBuilder;
|
||||
|
@ -24,7 +24,7 @@ import io.opentelemetry.sdk.trace.SdkTracerProviderBuilder;
|
|||
* that is used to create the auto-configured {@link SdkTracerProvider}.
|
||||
*
|
||||
* @author Yanming Zhou
|
||||
* @since 3.1.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface SdkTracerProviderBuilderCustomizer {
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
@ -30,7 +30,7 @@ import org.springframework.util.Assert;
|
|||
* A collection of {@link SpanExporter span exporters}.
|
||||
*
|
||||
* @author Moritz Halbritter
|
||||
* @since 3.2.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface SpanExporters extends Iterable<SpanExporter> {
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
|
@ -30,7 +30,7 @@ import org.springframework.util.Assert;
|
|||
* A collection of {@link SpanProcessor span processors}.
|
||||
*
|
||||
* @author Moritz Halbritter
|
||||
* @since 3.2.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface SpanProcessors extends Iterable<SpanProcessor> {
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
|
@ -27,7 +27,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
*
|
||||
* @author Moritz Halbritter
|
||||
* @author Jonatan Ivanov
|
||||
* @since 3.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.tracing")
|
||||
public class TracingProperties {
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.otlp;
|
||||
package org.springframework.boot.tracing.autoconfigure.otlp;
|
||||
|
||||
import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporterBuilder;
|
||||
|
||||
|
@ -23,7 +23,7 @@ import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporterBuilder;
|
|||
* {@link OtlpGrpcSpanExporterBuilder} whilst retaining default auto-configuration.
|
||||
*
|
||||
* @author Dmytro Nosan
|
||||
* @since 3.5.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface OtlpGrpcSpanExporterBuilderCustomizer {
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.otlp;
|
||||
package org.springframework.boot.tracing.autoconfigure.otlp;
|
||||
|
||||
import io.opentelemetry.exporter.otlp.http.trace.OtlpHttpSpanExporterBuilder;
|
||||
|
||||
|
@ -23,7 +23,7 @@ import io.opentelemetry.exporter.otlp.http.trace.OtlpHttpSpanExporterBuilder;
|
|||
* {@link OtlpHttpSpanExporterBuilder} whilst retaining default auto-configuration.
|
||||
*
|
||||
* @author Dmytro Nosan
|
||||
* @since 3.5.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface OtlpHttpSpanExporterBuilderCustomizer {
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.otlp;
|
||||
package org.springframework.boot.tracing.autoconfigure.otlp;
|
||||
|
||||
import io.micrometer.tracing.otel.bridge.OtelTracer;
|
||||
import io.opentelemetry.api.OpenTelemetry;
|
||||
|
@ -44,7 +44,7 @@ import org.springframework.context.annotation.Import;
|
|||
* @author Jonatan Ivanov
|
||||
* @author Moritz Halbritter
|
||||
* @author Eddú Meléndez
|
||||
* @since 3.4.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnClass({ OtelTracer.class, SdkTracerProvider.class, OpenTelemetry.class, OtlpHttpSpanExporter.class })
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.otlp;
|
||||
package org.springframework.boot.tracing.autoconfigure.otlp;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
|
@ -25,10 +25,10 @@ import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter;
|
|||
import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporterBuilder;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.ConditionalOnEnabledTracing;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.tracing.autoconfigure.ConditionalOnEnabledTracing;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.util.Assert;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.otlp;
|
||||
package org.springframework.boot.tracing.autoconfigure.otlp;
|
||||
|
||||
import org.springframework.boot.autoconfigure.service.connection.ConnectionDetails;
|
||||
|
||||
|
@ -23,7 +23,7 @@ import org.springframework.boot.autoconfigure.service.connection.ConnectionDetai
|
|||
*
|
||||
* @author Eddú Meléndez
|
||||
* @author Moritz Halbritter
|
||||
* @since 3.2.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public interface OtlpTracingConnectionDetails extends ConnectionDetails {
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.otlp;
|
||||
package org.springframework.boot.tracing.autoconfigure.otlp;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.HashMap;
|
||||
|
@ -26,7 +26,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
|
|||
* Configuration properties for exporting traces using OTLP.
|
||||
*
|
||||
* @author Jonatan Ivanov
|
||||
* @since 3.4.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@ConfigurationProperties("management.otlp.tracing")
|
||||
public class OtlpTracingProperties {
|
|
@ -14,13 +14,13 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.otlp;
|
||||
package org.springframework.boot.tracing.autoconfigure.otlp;
|
||||
|
||||
/**
|
||||
* Transport used to send OTLP data.
|
||||
*
|
||||
* @author Moritz Halbritter
|
||||
* @since 3.4.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
public enum Transport {
|
||||
|
|
@ -17,4 +17,4 @@
|
|||
/**
|
||||
* Auto-configuration for exporting traces with OTLP.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.otlp;
|
||||
package org.springframework.boot.tracing.autoconfigure.otlp;
|
|
@ -17,4 +17,4 @@
|
|||
/**
|
||||
* Auto-configuration for Micrometer Tracing.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
|
@ -14,19 +14,19 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.prometheus;
|
||||
package org.springframework.boot.tracing.autoconfigure.prometheus;
|
||||
|
||||
import io.micrometer.tracing.Span;
|
||||
import io.micrometer.tracing.Tracer;
|
||||
import io.prometheus.metrics.tracer.common.SpanContext;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.MicrometerTracingAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.tracing.autoconfigure.MicrometerTracingAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.util.function.SingletonSupplier;
|
||||
|
||||
|
@ -35,7 +35,7 @@ import org.springframework.util.function.SingletonSupplier;
|
|||
* Micrometer Tracing.
|
||||
*
|
||||
* @author Jonatan Ivanov
|
||||
* @since 3.0.0
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration(
|
||||
beforeName = "org.springframework.boot.metrics.autoconfigure.export.prometheus.PrometheusMetricsExportAutoConfiguration",
|
|
@ -17,4 +17,4 @@
|
|||
/**
|
||||
* Auto-configuration for Prometheus Exemplars with Micrometer Tracing.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.prometheus;
|
||||
package org.springframework.boot.tracing.autoconfigure.prometheus;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.zipkin;
|
||||
package org.springframework.boot.tracing.autoconfigure.zipkin;
|
||||
|
||||
import brave.Tag;
|
||||
import brave.Tags;
|
||||
|
@ -29,14 +29,14 @@ import zipkin2.reporter.brave.AsyncZipkinSpanHandler;
|
|||
import zipkin2.reporter.brave.MutableSpanBytesEncoder;
|
||||
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.ConditionalOnEnabledTracing;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinTracingAutoConfiguration.BraveConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinTracingAutoConfiguration.OpenTelemetryConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.tracing.autoconfigure.ConditionalOnEnabledTracing;
|
||||
import org.springframework.boot.tracing.autoconfigure.zipkin.ZipkinTracingAutoConfiguration.BraveConfiguration;
|
||||
import org.springframework.boot.tracing.autoconfigure.zipkin.ZipkinTracingAutoConfiguration.OpenTelemetryConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
@ -50,8 +50,8 @@ import org.springframework.context.annotation.Import;
|
|||
* @author Phillip Webb
|
||||
* @since 4.0.0
|
||||
*/
|
||||
@AutoConfiguration
|
||||
@ConditionalOnClass(Encoding.class)
|
||||
@AutoConfiguration(afterName = "org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration")
|
||||
@Import({ BraveConfiguration.class, OpenTelemetryConfiguration.class })
|
||||
public class ZipkinTracingAutoConfiguration {
|
||||
|
|
@ -17,4 +17,4 @@
|
|||
/**
|
||||
* Auto-configuration for tracing with Zipkin.
|
||||
*/
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.zipkin;
|
||||
package org.springframework.boot.tracing.autoconfigure.zipkin;
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"groups": [],
|
||||
"properties": [
|
||||
{
|
||||
"name": "management.otlp.tracing.export.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether auto-configuration of tracing is enabled to export OTLP traces."
|
||||
},
|
||||
{
|
||||
"name": "management.tracing.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether auto-configuration of tracing is enabled to export and propagate traces.",
|
||||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "management.tracing.propagation.consume",
|
||||
"defaultValue": [
|
||||
"W3C",
|
||||
"B3",
|
||||
"B3_MULTI"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "management.tracing.propagation.produce",
|
||||
"defaultValue": [
|
||||
"W3C"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "management.zipkin.tracing.export.enabled",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Whether auto-configuration of tracing is enabled to export Zipkin traces."
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
org.springframework.boot.tracing.autoconfigure.OpenTelemetryEventPublisherBeansTestExecutionListener
|
|
@ -0,0 +1,7 @@
|
|||
# Environment Post Processors
|
||||
org.springframework.boot.env.EnvironmentPostProcessor=\
|
||||
org.springframework.boot.tracing.autoconfigure.LogCorrelationEnvironmentPostProcessor
|
||||
|
||||
# Application Listeners
|
||||
org.springframework.context.ApplicationListener=\
|
||||
org.springframework.boot.tracing.autoconfigure.OpenTelemetryEventPublisherBeansApplicationListener
|
|
@ -0,0 +1,7 @@
|
|||
org.springframework.boot.tracing.autoconfigure.BraveAutoConfiguration
|
||||
org.springframework.boot.tracing.autoconfigure.MicrometerTracingAutoConfiguration
|
||||
org.springframework.boot.tracing.autoconfigure.NoopTracerAutoConfiguration
|
||||
org.springframework.boot.tracing.autoconfigure.OpenTelemetryTracingAutoConfiguration
|
||||
org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingAutoConfiguration
|
||||
org.springframework.boot.tracing.autoconfigure.prometheus.PrometheusExemplarsAutoConfiguration
|
||||
org.springframework.boot.tracing.autoconfigure.zipkin.ZipkinTracingAutoConfiguration
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
|
@ -50,12 +50,12 @@ import org.assertj.core.api.Assertions;
|
|||
import org.assertj.core.api.InstanceOfAssertFactories;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.BraveAutoConfigurationTests.SpanHandlerConfiguration.AdditionalSpanHandler;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.context.properties.IncompatibleConfigurationException;
|
||||
import org.springframework.boot.observation.autoconfigure.ObservationAutoConfiguration;
|
||||
import org.springframework.boot.test.context.FilteredClassLoader;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.tracing.autoconfigure.BraveAutoConfigurationTests.SpanHandlerConfiguration.AdditionalSpanHandler;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.annotation.Order;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
@ -34,8 +34,8 @@ import org.junit.jupiter.api.Test;
|
|||
import org.mockito.InOrder;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.TracingProperties.Propagation;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.TracingProperties.Propagation.PropagationType;
|
||||
import org.springframework.boot.tracing.autoconfigure.TracingProperties.Propagation;
|
||||
import org.springframework.boot.tracing.autoconfigure.TracingProperties.Propagation.PropagationType;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import brave.baggage.BaggageField;
|
||||
import brave.baggage.BaggagePropagation;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import io.micrometer.tracing.Tracer;
|
||||
import org.junit.jupiter.api.Test;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
|
@ -23,8 +23,8 @@ import java.util.function.Function;
|
|||
import io.opentelemetry.context.ContextStorage;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryEventPublisherBeansApplicationListener.Wrapper.Storage;
|
||||
import org.springframework.boot.testsupport.classpath.ForkedClassPath;
|
||||
import org.springframework.boot.tracing.autoconfigure.OpenTelemetryEventPublisherBeansApplicationListener.Wrapper.Storage;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.Mockito.mock;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.ArrayList;
|
||||
|
@ -61,7 +61,6 @@ import org.junit.jupiter.params.provider.ValueSource;
|
|||
import org.mockito.Mockito;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.context.annotation.Configurations;
|
||||
import org.springframework.boot.observation.autoconfigure.ObservationAutoConfiguration;
|
||||
import org.springframework.boot.test.context.FilteredClassLoader;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
|
@ -381,13 +380,6 @@ class OpenTelemetryTracingAutoConfigurationTests {
|
|||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
void shouldUseReplacementForDeprecatedVersion() {
|
||||
Class<?>[] classes = Configurations.getClasses(AutoConfigurations.of(OpenTelemetryAutoConfiguration.class));
|
||||
assertThat(classes).containsExactly(OpenTelemetryTracingAutoConfiguration.class);
|
||||
}
|
||||
|
||||
private void initializeOpenTelemetry(ConfigurableApplicationContext context) {
|
||||
context.addApplicationListener(new OpenTelemetryEventPublisherBeansApplicationListener());
|
||||
Span.current();
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing;
|
||||
package org.springframework.boot.tracing.autoconfigure;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.otlp;
|
||||
package org.springframework.boot.tracing.autoconfigure.otlp;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
@ -46,13 +46,13 @@ import org.junit.jupiter.api.AfterEach;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.MicrometerTracingAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.OpenTelemetryTracingAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingAutoConfigurationIntegrationTests.MockGrpcServer.RecordedGrpcRequest;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.observation.autoconfigure.ObservationAutoConfiguration;
|
||||
import org.springframework.boot.opentelemetry.autoconfigure.OpenTelemetrySdkAutoConfiguration;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.tracing.autoconfigure.MicrometerTracingAutoConfiguration;
|
||||
import org.springframework.boot.tracing.autoconfigure.OpenTelemetryTracingAutoConfiguration;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingAutoConfigurationIntegrationTests.MockGrpcServer.RecordedGrpcRequest;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.otlp;
|
||||
package org.springframework.boot.tracing.autoconfigure.otlp;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
|
@ -29,10 +29,10 @@ import okhttp3.HttpUrl;
|
|||
import org.assertj.core.api.InstanceOfAssertFactories;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingConfigurations.ConnectionDetails.PropertiesOtlpTracingConnectionDetails;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.test.context.FilteredClassLoader;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingConfigurations.ConnectionDetails.PropertiesOtlpTracingConnectionDetails;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.prometheus;
|
||||
package org.springframework.boot.tracing.autoconfigure.prometheus;
|
||||
|
||||
import io.micrometer.tracing.Span;
|
||||
import io.micrometer.tracing.TraceContext;
|
||||
|
@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.ObjectProvider;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.prometheus.PrometheusExemplarsAutoConfiguration.LazyTracingSpanContext;
|
||||
import org.springframework.boot.tracing.autoconfigure.prometheus.PrometheusExemplarsAutoConfiguration.LazyTracingSpanContext;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.mockito.BDDMockito.given;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.prometheus;
|
||||
package org.springframework.boot.tracing.autoconfigure.prometheus;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.regex.Matcher;
|
||||
|
@ -31,14 +31,14 @@ import io.prometheus.metrics.expositionformats.OpenMetricsTextFormatWriter;
|
|||
import io.prometheus.metrics.tracer.common.SpanContext;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.BraveAutoConfiguration;
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.MicrometerTracingAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.metrics.autoconfigure.MetricsAutoConfiguration;
|
||||
import org.springframework.boot.metrics.autoconfigure.export.prometheus.PrometheusMetricsExportAutoConfiguration;
|
||||
import org.springframework.boot.observation.autoconfigure.ObservationAutoConfiguration;
|
||||
import org.springframework.boot.test.context.FilteredClassLoader;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.tracing.autoconfigure.BraveAutoConfiguration;
|
||||
import org.springframework.boot.tracing.autoconfigure.MicrometerTracingAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.util.StringUtils;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.zipkin;
|
||||
package org.springframework.boot.tracing.autoconfigure.zipkin;
|
||||
|
||||
import zipkin2.reporter.Encoding;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.zipkin;
|
||||
package org.springframework.boot.tracing.autoconfigure.zipkin;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.zipkin;
|
||||
package org.springframework.boot.tracing.autoconfigure.zipkin;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
|
@ -28,10 +28,10 @@ import zipkin2.reporter.BytesMessageSender;
|
|||
import zipkin2.reporter.Encoding;
|
||||
import zipkin2.reporter.brave.AsyncZipkinSpanHandler;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinTracingAutoConfiguration.BraveConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.test.context.FilteredClassLoader;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.tracing.autoconfigure.zipkin.ZipkinTracingAutoConfiguration.BraveConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.actuate.autoconfigure.tracing.zipkin;
|
||||
package org.springframework.boot.tracing.autoconfigure.zipkin;
|
||||
|
||||
import io.opentelemetry.exporter.zipkin.ZipkinSpanExporter;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -23,10 +23,10 @@ import zipkin2.reporter.BytesEncoder;
|
|||
import zipkin2.reporter.BytesMessageSender;
|
||||
import zipkin2.reporter.Encoding;
|
||||
|
||||
import org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinTracingAutoConfiguration.OpenTelemetryConfiguration;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.test.context.FilteredClassLoader;
|
||||
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
import org.springframework.boot.tracing.autoconfigure.zipkin.ZipkinTracingAutoConfiguration.OpenTelemetryConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
|
@ -65,19 +65,19 @@
|
|||
<allow pkg="io.micrometer" />
|
||||
</subpackage>
|
||||
|
||||
<subpackage name="tracing">
|
||||
<allow pkg="io.micrometer" />
|
||||
</subpackage>
|
||||
|
||||
<subpackage name="[^.]+\.actuate" regex="true">
|
||||
<subpackage name="endpoint">
|
||||
<file name=".*Endpoint(WebExtension)?" regex="true">
|
||||
<allow pkg="org.springframework.lang"/>
|
||||
</file>
|
||||
</subpackage>
|
||||
<subpackage name="metrics">
|
||||
<allow pkg="io.micrometer" />
|
||||
</subpackage>
|
||||
</subpackage>
|
||||
|
||||
<subpackage name="actuate">
|
||||
<allow pkg="io.micrometer" />
|
||||
<!-- Endpoint infrastructure -->
|
||||
<subpackage name="endpoint">
|
||||
<disallow pkg="org.springframework.http" />
|
||||
|
@ -100,9 +100,6 @@
|
|||
</subpackage>
|
||||
</subpackage>
|
||||
</subpackage>
|
||||
<file name=".*Endpoint(WebExtension)?" regex="true">
|
||||
<allow pkg="org.springframework.lang"/>
|
||||
</file>
|
||||
</subpackage>
|
||||
|
||||
<subpackage name="docs">
|
||||
|
|
Loading…
Reference in New Issue