Я разрабатываю проект с использованием 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
Программисты JAVA общаются здесь
1738006341
Anonymous
Я разрабатываю проект с использованием 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.
Подробнее здесь: [url]https://stackoverflow.com/questions/79386033/spring-boot-and-opentelemetry-show-only-the-first-level-of-trace-in-the-jaeger-u[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия