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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745034744a4607447.html
评论列表(0条)