admin管理员组文章数量:1406728
I have spring boot 3.4 application configured for metrics.
- I've added dependencies:
implementation("io.micrometer:micrometer-tracing-bridge-otel")
implementation("io.opentelemetry:opentelemetry-exporter-zipkin")
to my build.gradle.kts
added annotation
@Observed
on some methodsadded to
application.yaml
:
management:
tracing:
sampling:
probability: 1
- Also I've started Zipkin using following docker compose file:
version: '2.4'
services:
# The zipkin process services the UI, and also exposes a POST endpoint that
# instrumentation can send trace data to.
zipkin:
image: ghcr.io/openzipkin/zipkin-slim:${TAG:-latest}
container_name: zipkin
# Environment settings are defined here .md#environment-variables
environment:
- STORAGE_TYPE=mem
# Uncomment to enable self-tracing
# - SELF_TRACING_ENABLED=true
# Uncomment to increase heap size
# - JAVA_OPTS=-Xms128m -Xmx128m -XX:+ExitOnOutOfMemoryError
ports:
# Port used for the Zipkin UI and HTTP Api
- 9411:9411
# Uncomment to enable debug logging
# command: --logging.level.zipkin2=DEBUG
Everything is working and I see traces/spans in zipkin web ui but I have a question:
Is it possible to save traces locally without sending them to zipkin ui ?
Could I use different transport to send them to zipkin ?
I have spring boot 3.4 application configured for metrics.
- I've added dependencies:
implementation("io.micrometer:micrometer-tracing-bridge-otel")
implementation("io.opentelemetry:opentelemetry-exporter-zipkin")
to my build.gradle.kts
added annotation
@Observed
on some methodsadded to
application.yaml
:
management:
tracing:
sampling:
probability: 1
- Also I've started Zipkin using following docker compose file:
version: '2.4'
services:
# The zipkin process services the UI, and also exposes a POST endpoint that
# instrumentation can send trace data to.
zipkin:
image: ghcr.io/openzipkin/zipkin-slim:${TAG:-latest}
container_name: zipkin
# Environment settings are defined here https://github/openzipkin/zipkin/blob/master/zipkin-server/README.md#environment-variables
environment:
- STORAGE_TYPE=mem
# Uncomment to enable self-tracing
# - SELF_TRACING_ENABLED=true
# Uncomment to increase heap size
# - JAVA_OPTS=-Xms128m -Xmx128m -XX:+ExitOnOutOfMemoryError
ports:
# Port used for the Zipkin UI and HTTP Api
- 9411:9411
# Uncomment to enable debug logging
# command: --logging.level.zipkin2=DEBUG
Everything is working and I see traces/spans in zipkin web ui but I have a question:
Is it possible to save traces locally without sending them to zipkin ui ?
Could I use different transport to send them to zipkin ?
Share Improve this question asked Mar 4 at 15:33 gstackoverflowgstackoverflow 36.6k138 gold badges419 silver badges786 bronze badges1 Answer
Reset to default 0Is it possible to save traces locally without sending them to zipkin ui ?
Yes, you can implement an exporter to write the data to disk.
Could I use different transport to send them to zipkin ?
Yes, you can implement an exporter to use whatever transport Zipkin supports.
本文标签: spring bootIs there way to persist traces on a disk instead of sending them to ZipkinStack Overflow
版权声明:本文标题:spring boot - Is there way to persist traces on a disk instead of sending them to Zipkin? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745034744a2638714.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论