Search code examples
tracedaprsidecarobservability

Can Dapr really enable distributed tracing in an application without changing any application code?


We can find in Dapr Quickstarts that with Dapr

you'll be enabling distributed tracing on an application without changing any application code or creating a dependency on any specific tracing system.

But the example presented uses code to call dapr api. I tried to make some calls without calling the Dapr sidecar and they don't show up in the tracing.

Does this mean it only tracks calls made to/with the Dapr sidecar?

In that case, I'll need to change a lot of application code to add observability to an existing application that already uses direct calls, won't I?


Solution

  • You are correct Ocimar. Dapr can track only calls made to/from the sidecar. But you wouldn't use Dapr only for tracing purpose. Ideally you would use Dapr for some of the other features such as binding other external systems, service invocation, pub/sub, resiliency, etc. And you can do that, but not having any Dapr specific dependency within your application.

    If you are using Dapr for these reasons, you can configure it and add tracing w/o changing your application. And the beautiful thing is that, tracing is not only for service-to-service invocation, but also bindings...