Spring-cloud-sleuth: Add integration support for Google Stackdriver Trace

Created on 7 Sep 2016  路  9Comments  路  Source: spring-cloud/spring-cloud-sleuth

Referencing https://cloud.google.com/trace/api/?hl=en_US,

Would you consider adding pushing trace-span data to Google's Stackdriver trace? They have a Java API here, but as far as I experienced samples have dependency issues with grpc. Since spring have oauth2 support, REST API may be used as a beginning.

What do you think?

enhancement

Most helpful comment

@cemo check this out. It's a Zipkin collector implementation that forwards trace data to Stackdriver Trace. We'll be publishing the official announcement shortly, but feel free to try it out and let myself and @kevinmdavis and I know what you think.

All 9 comments

@nyilmaz we're going to move our transport layer to https://github.com/openzipkin/zipkin-reporter-java in the near future. This will include a Sender component which by default will go to zipkin. A sender that does oauth etc will make sense when going to stackdriver, although a zipkin-> stackdriver proxy is also an option.

While you can pad out in the mean time, we need to address 128 bit trace ids (not span ids, just trace ids) for this to work well. Please upvote this change, which I'll be working on shortly.

@adriancole Is there any progress on this issue? I believe that this is a quick win for zipkin. Introducing zipkin features into a library without using a backend sounds really cool.

Hey Cemo, I'm the PM for Stackdriver Trace @ Google! We're actually working on something that'll achieve this, which we'll be announcing soon. I'll reply back when we're able to show more to a broader audience.

Hey @mtwo! We will be looking forward your news. Thanks for the heads up.

@cemo check this out. It's a Zipkin collector implementation that forwards trace data to Stackdriver Trace. We'll be publishing the official announcement shortly, but feel free to try it out and let myself and @kevinmdavis and I know what you think.

@mtwo now i'm trying stackdriver-zipkin adapter but i could not find how to set ZipkinStackdriverStorageProperties#apiHost.

Hi @nyilmaz! ZipkinStackdriverStorageProperties#apiHost configures the endpoint the collector will use to call the Stackdriver Trace API so the default value of "cloudtrace.googleapis.com" should work for most users. Setting ZipkinStackdriverStorageProperties#projectId and configuring the Google Application Default Credentials should be enough to setup the collector.

Feel free to open an issue in GoogleCloudPlatform/stackdriver-zipkin if you have any other questions.

here's a full blog on the integration.
https://cloudplatform.googleblog.com/2016/12/Stackdriver-Trace-Zipkin-distributed-tracing-and-performance-analysis-for-everyone.html

As far as spring-cloud-sleuth goes, you use the normal HttpZipkinSpanReporter which is bundled in the spring-cloud-sleuth-zipkin dependency. There's no difference between using the normal zipkin server and the stackdriver connector. For any server config related concerns, best to use Kevin's advice.

If for some reason the connector isn't possible, and you need to have sleuth send spans directly to stackdriver, I'd suggest raising an issue in https://github.com/GoogleCloudPlatform/stackdriver-zipkin/ for a stackdriver "sender" which is the component that could relatively easily fit where the current http one does.

Was this page helpful?
0 / 5 - 0 ratings