Integrating Sentry with Zipkin

Hi, Sentry guys!

I want to integrate Sentry with the distributed tracing tool Zipkin. The idea is that using Zipkin you can obtain traces of requests that’re flowing through the system, and sometimes these traces can be interrupted by exceptions. In this case, I want to get as much information about these exceptions as possible, but Zipkin is not suitable for storing stacktraces/other exception’s info, but it’s what Sentry is made for.

So greatly simplified, my case looks like

    try {

      try {
        Span span = startTracing("opname");
        Result res = longOperation();
        span.setTag("status", res.status);
      } catch (Exception e) {
        span.setTag("error", e.getMessage());
      } finally {
        span.finish(); // here the span goes to Zipkin
    } catch (Exception e) {; // here the exception gets reported to Sentry

It would be great if before finishing span I could obtain some exception id which later I would be able to use to connect my zipkin spans to the related exceptions in sentry. Ideally, I’d do it without modifying exception classes (as not all exception classes are under my control)

Do you think it’s currently possible?

Usually, you have a request / transaction ID associated with the trace, and you can send that as a breadcrumb to Sentry.

@jhermann Thanks, I’ll try to look into breadcrumbs