'How to auto instrument my Spring Boot web api call tracing and send to Google Cloud Trace
I am trying to figure out how to auto instrument my Spring Boot web api call tracing to Google Cloud Trace. (My Spring Boot app is in GKE).
I did similar thing for my Node service, which could use OpenTememetry js package auto instrument express calls and use Google Cloud Trace exporter.
But for my Spring Boot app, I tried a few ways, but I guess due to lack of knowledge I am not able to achieve what I want.
- I try to use OpenTelemetry java lib, it mentioned it can auto instrument spring boot, but I don't know how to achieve it and I didn't find an export to Google Cloud Trace(stackdriver) neither
- I try to use OpenCensus, It has a Google Cloud Trace export, but I didn't see any document mentioned how to auto instrument spring boot.
- I try to use OpenTelmetry and instead of use an export, I deployed an OpenTelemtry Collector, but I don't know how the config the collector and the SDK to let the auto instrumented tracing spans got to the OpenTelemetry collector.
Does anyone has experiences using OpenCensus/OpenTelemetry to generate tracing information and forward it to Google Cloud Trace(StackDrivers).
Solution 1:[1]
take a look of this link, you will have to use an otel extension and set the GOOGLE_CLOUD_PROJECT and GOOGLE_APPLICATION_CREDENTIALS env vars
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Andres Castellanos |