opencensus-java icon indicating copy to clipboard operation
opencensus-java copied to clipboard

How to make opencensus transparency to user application?

Open a651694192 opened this issue 6 years ago • 3 comments

I wonder if we can make opencensus transparency to users, which means users don't need to change their application to collect the telemetry just like spring cloud seluth do. As I'm new to opencensus, I don't know if we already enable this because I think this is a fundamental requirement for the distributed tracing.

a651694192 avatar May 23 '19 09:05 a651694192

You'll be able to get telemetry out-of-box if you're using one of the frameworks that's already instrumented with OpenCensus. See https://opencensus.io/integrations/ and https://opencensus.io/guides/. For Spring integration, we're actively working on it.

songy23 avatar May 23 '19 16:05 songy23

You'll be able to get telemetry out-of-box if you're using one of the frameworks that's already instrumented with OpenCensus. See https://opencensus.io/integrations/ and https://opencensus.io/guides/. For Spring integration, we're actively working on it.

But it seems even integrated framework require code inject/code change for user application, for example in your http example https://opencensus.io/guides/http/java/jetty/client/

a651694192 avatar May 24 '19 02:05 a651694192

That's correct. Collecting and exporting trace and metrics could be expensive (both in terms of overhead to applications, and money cost if you're using commercial APMs). Thus we want users to have full control over it, e.g what kind of metrics/trace to collect, how frequently telemetry is exported, which APM backend to use, etc.

Instead of doing explicit instrumentation in the application, you can consider using a JVM agent that manipulates Java bytecode as an alternative, for example inspectIT Ocelot. /cc @JonasKunz @AlexanderWert for guidance here.

songy23 avatar May 24 '19 16:05 songy23