Small question regarding SpringBoot web applications and tracing please.
By tracing, I mean traceId,spanId,parentId. Most of all, how to collect/scrap/poll those traces.
For example, logging: SpringBoot can send logs to external systems (send log over the wire) to Loki, Logstash (just to name a few). But this construct requires the web application to know the destinations, and to send the logs there.
An alternative to this construct, which is non invasive, is to just write the logs in a log file, and let some logs forwarder, for instance FileBeat, Splunk forwarder, to collect/scrap/poll the logs and those will send to the destinations, without having the web application know anything about them.
Another example, metrics. SpringBoot can send metrics to different metrics backend, such as Elastic, DataDog (just to name a few) using the micrometer-registry-abc. But again, the web application here needs to know about the destination.
An alternative to this construct is for instance to expose the /metrics endpoint, or the /prometheus endpoint, and have something like MetricBeat, Prometheus agent collect/scrap/poll those metrics. Here again, the web application does not need to know anything about the destinations, it is non obtrusive at all.
My question is when it comes to traces. As in traceId,spanId,parentId. SpringBoot can send traces to Zipkin server, which is very popular.
However, it seems there is no construct to collect/scrap/poll traces.
send/push | collect/scrap/poll | |
---|---|---|
logging | yes (TCP Logstash/ Loki) | yes (FileBeat/Splunk Forwarder) |
metrics | yes (micrometer-registry-X) | yes (prometheus agent/ MetricBeat |
traces | yes (zipkin) | ? |
Question, what is the best way to have SpringBoot generated traces collected/scraped/polled in a non invasive way please?
Thank you