I implemented code from this article: https://programmingtechie.com/2023/09/09/spring-boot3-observability-grafana-stack/
- Can I enable tracing only for specific endpoints ?
- Trace id between services pass by http header? And how Can I check it?
- Can I use Graylog instead of Loki ? Maybe such example available.
Yes you can write an
ObservationPredicate
and disable everything, except what you want:(example)
Yes, the same way you would check anything else that is in the request: using a debugger, using rq/rs logs (e.g.: logbook), using netcat/ncat/etc., using wiremock or an httpbin-like service like httpbin.org.
Yes, that has nothing to do with Micrometer, if your loging library can send logs to Graylog, you should be ok.
Fyi: There is some likelihood that the article was made after one of the talks that one of us from the Micrometer team gave and after the demo apps of those talks. You can find the full demo app here: https://github.com/jonatan-ivanov/teahouse/ and a talk demoing the app and its capabilities: https://www.youtube.com/watch?v=HQHuFnKvk_U