Kong: Integrate with Zipkin

Created on 23 Jun 2016  路  25Comments  路  Source: Kong/kong

Zipkin, https://github.com/openzipkin/zipkin, is very useful for monitoring microservices.
However it requires every hop to be integrated.

idenew plugin

Most helpful comment

@coopr what do you make of https://github.com/sfhardman/kong-plugin-zipkin and https://github.com/opentracing-contrib/nginx-opentracing ? Are they lacking some polish or there are some bigger issues? Both look pretty much working to me.

All 25 comments

@mingfang like sysdig?

@sinzone I haven't used sysdig but by the name I imagine sysdig if focus on infrastructure monitoring.
Zipkin is used for API monitoring. It is especially useful in a microservice system where a single incoming call can fan out to many internal calls.

like tracing back the latency?

have you seen Correlation ID plugin, and the proposed enhancements in #1288 ? Won't these serve your purpose?

Zipkin support would be great!

@mingfang @FlorianLautenschlager can you clarify why the Correlation ID plugin mentioned by @Tieske doesn't solve this problem? I'd love to understand the gap between what that plugin does, and what Zipkin needs (if there is a gap).

That looks really cool - I'd love to see a guide if anyone has an existing zipkin implementation.

I've got this going as a proof of concept: https://github.com/sfhardman/kong-plugin-zipkin

@coopr The correlation id plugin in my opinion only solves a part of the problem. It adds (as Zipkin also does) a header to the request. Therefore one can trace a request at the highest level (only one trace for all following services). In contrast Zipkin is more powerful as it has a parent-child concept of so called spans (see here). Therefore Zipkin allows to build a span with child spans for the involved services. Furthermore as Zipkin is very popular there are various client implementations: Sleuth (Spring Boot), Java, GO, Python, etc.

I think the Kong ecosystem would benefit of such a plugin.

@sfhardman nice.

+1
our services all use Kong for internal interservice communication. To use zipkin for tracing we would have to instrument every application to use zipkin. Putting communication to zipkin in Kong would alleviate us from having to do this.

Hi guys, is this officially OK with you? Would it be worth implementing?

Also, are you aware of https://github.com/opentracing-contrib/nginx-opentracing ?

I'm ok to close this

@mingfang - why? Has it been implemented by someone? Not sure what to make out of this issue...

I think Open Tracing would be great to add to Kong - we'd welcome a PR @ror6ax

@coopr what do you make of https://github.com/sfhardman/kong-plugin-zipkin and https://github.com/opentracing-contrib/nginx-opentracing ? Are they lacking some polish or there are some bigger issues? Both look pretty much working to me.

FYI we are about to add dynamic loading to OpenTracing, which I think kong would find useful: https://github.com/opentracing/opentracing-cpp/pull/45

The project https://github.com/opentracing-contrib/nginx-opentracing looks interesting. It seems however that we need to rebuild kong in order to use it.

Is there some documentation on building kong?

Just wanted to say that @james-callahan is currently working on it and we should have an official plugin released very very soon.

Plugin development is occuring here: https://github.com/kong/kong-plugin-zipkin

Hey @james-callahan, glad to see OpenTracing support being added to Kong. Would you be open to developing some of this work like https://github.com/Kong/opentracing-lua as an official lua language API under https://github.com/opentracing?

Would you be open to developing some of this work like https://github.com/Kong/opentracing-lua as an official lua language API under https://github.com/opentracing?

I made a request for it over here: https://github.com/opentracing/contrib/issues/8
Do you know of others interested in driving the development?

@james-callahan - I am interested in working on this. I am wondering if you were considering adding multiple tracer implementations like Jaeger etc. Zipkin != OpenTracing.

I'd be happy to look into contributing code to achieve that integration.

+1

I am wondering if you were considering adding multiple tracer implementations like Jaeger etc. Zipkin != OpenTracing.

Yes. the kong zipkin is built on top of an opentracing base.
A zipkin reporter seemed like a good first step, as jaegar has a zipkin API compatible mode.

I'd be happy to look into contributing code to achieve that integration.

Please do!

  • The kong plugin is being developed here
  • An opentracing API is being developed here

The Zipkin plugin for Kong has been released! It is available today bundled with Kong Enterprise Edition (EE) v0.32. It will be bundled with Kong Community Edition (CE) starting with the next release, CE v0.14, likely in June 2018.

Was this page helpful?
0 / 5 - 0 ratings