Я разрабатываю проект с использованием Spring Boot и OpentereLemetry, но когда я отправляю трассы Jaeger, я вижу только первый уровень трассировки.
docker-compose
# https://www.jaegertracing.io/docs/2.2/getting-started/
jaeger:
image: jaegertracing/jaeger:2.2.0
container_name: jaeger
ports:
- "16686:16686" # the jaeger UI
- "4317:4317" # the OpenTelemetry collector grpc
environment:
- COLLECTOR_OTLP_ENABLED=true
networks:
- lab-monitoring-network
restart: always
< /code>
ниже моих конфигураций (build.gradle): < /p>
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.3'
implementation "io.micrometer:micrometer-core"
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'io.micrometer:micrometer-registry-prometheus'
implementation 'io.micrometer:micrometer-tracing-bridge-otel'
implementation 'io.opentelemetry:opentelemetry-exporter-otlp'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
< /code>
spring:
application:
name: ms-spring-product-api
datasource:
url: jdbc:postgresql://localhost:5432/db_system
username: postgres
password: 123456
driver-class-name: org.postgresql.Driver
hikari:
maximum-pool-size: 10
minimum-idle: 5
jpa:
hibernate:
ddl-auto: update
show-sql: true
database-platform: org.hibernate.dialect.PostgreSQLDialect
logging:
level:
org.springframework.web: TRACE
io.opentelemetry: TRACE
management:
tracing:
sampling:
probability: 1.0
tracing:
url: http://localhost:4317
< /code>
Class Configuration
package br.com.ciceroednilson.configuration;
import io.opentelemetry.context.propagation.TextMapPropagator;
import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter;
import io.opentelemetry.extension.trace.propagation.JaegerPropagator;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class OpenTelemetryConfiguration {
@Bean
public OtlpGrpcSpanExporter otlpHttpSpanExporter(@Value("${tracing.url}") String url) {
return OtlpGrpcSpanExporter.builder().setEndpoint(url).build();
}
@Bean
public TextMapPropagator jaegerPropagator() {
return JaegerPropagator.getInstance();
}
}`
< /code>
I would like to see the full trace of the request, for example:
controller -> service -> repository
[Image 1] (https://i.sstatic.net/pzq7kjPf.png)
show first level
I try see trace of the application but I can't see all levels of trace.
Подробнее здесь: https://stackoverflow.com/questions/793 ... e-jaeger-u
Spring Boot и Opentelemetry показывают только первый уровень трассировки в интерфейсе jaeger ⇐ JAVA
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение