- автоматически добавлять TraceId в журнал (с помощью MDC)
- автоматически добавлять spanId при вызове redis или jdbc (я хочу использовать инструменты opentelemetry)
- экспортировать в zipkin
Код: Выделить всё
org.springframework.boot
spring-boot-starter-parent
3.3.0
io.micrometer
micrometer-registry-prometheus
io.micrometer
micrometer-tracing-bridge-otel
io.opentelemetry
opentelemetry-exporter-zipkin
io.opentelemetry.instrumentation
opentelemetry-spring-boot-starter
io.opentelemetry.instrumentation
opentelemetry-instrumentation-bom
2.8.0
pom
import
- Это работает без opentelemetry-spring-boot-starter, я могу добавить идентификатор трассировки в журнал и экспортировать в zipkin с помощью application.yaml
Код: Выделить всё
management:
zipkin:
tracing:
endpoint: http://localhost:9411/api/v2/spans
- После добавления opentelemetry-exporter-zipkin возникла ошибка
Код: Выделить всё
- Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]:
- Unsatisfied dependency expressed through method 'dataSourceScriptDatabaseInitializer' parameter 0:
- Error creating bean with name 'getDataSource' defined in class path resource [zalopay/pe/zaskeeper/infra/database/jdbc/config/JdbcConfig.class]:
- Error creating bean with name 'openTelemetry' defined in class path resource [io/opentelemetry/instrumentation/spring/autoconfigure/OpenTelemetryAutoConfiguration$OpenTelemetrySdkConfig.class]:
- Unsatisfied dependency expressed through method 'openTelemetry' parameter 0:
- Error creating bean with name 'autoConfiguredOpenTelemetrySdk' defined in class path resource [io/opentelemetry/instrumentation/spring/autoconfigure/OpenTelemetryAutoConfiguration$OpenTelemetrySdkConfig.class]:
- Failed to instantiate [io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk]:
- Factory method 'autoConfiguredOpenTelemetrySdk' threw exception with message: io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider:
- Provider io.opentelemetry.instrumentation.resources.ManifestResourceProvider could not be instantiated
Может ли кто-нибудь помочь мне устранить эту ошибку или помочь мне навстречу новому подходу?
Подробнее здесь: https://stackoverflow.com/questions/790 ... bc-get-err