open-telemetry / opentelemetry.io

The OpenTelemetry website and documentation
https://opentelemetry.io
Creative Commons Attribution 4.0 International
497 stars 1.03k forks source link

Go library that has OpenTelemetry natively integrated (KrakenD) #4474

Open alombarte opened 2 months ago

alombarte commented 2 months ago

Hello, I found the following text in this URL: https://opentelemetry.io/docs/languages/go/libraries/

Help wanted! As of today, we don't know about any Go library that has OpenTelemetry natively integrated. If you know about such a library, let us know.

I am guessing this is just outdated information because there are a lot of integrations on your web page (including ours, thanks to whoever added it).

In any case, at KrakenD, we have been offering the Go library in production for about two months with very good results (source code).

In case you are unfamiliar, KrakenD is an open-source high-performance API Gateway used by small and large (Forbes 500) companies and governments. It runs on 2M servers/pods every month. OpenTelemetry is gradually replacing OpenCensus (which we happily used for 6 years) among our user base, and it provides full visibility across all stages of a request/response flow.

I am happy to provide any additional details you want and am open to collaboration. Otherwise, feel free to close this issue.

Thanks and keep up the good work!

svrnm commented 2 months ago

hey @alombarte, thanks for raising this issue! There are many integrations indeed, but all of them are applications integrating OpenTelemetry, which is great, but not what we want to have listed on that page. This page is about libraries consumed by applications, and those libraries having opentelemetry integrated directly, so also no "instrumentation libraries", e.g. for JavaScript NextJS is fullfilling that requirement: https://nextjs.org/docs/app/building-your-application/optimizing/open-telemetry

alombarte commented 2 months ago

Hi @svrnm,

Just one more comment to clarify in case this is useful. You are right that KrakenD is an application, but krakend-otel is a pure Go library, that is consumed by KrakenD but also others.

Although this is not as generic as a Vercel/NodeJS application it is still a library to be loaded in a framework (more specifically in the (Lura Project - The Linux foundation). And this is not an app, is a framework to build gateways. It is named krakend-otel because, well, our company has this name :)

We developed the library generically, and the main user is KrakenD itself, but it can be loaded into any other application that uses the Lura framework.

This is probably not what you are looking for, but still, I wanted to raise my hand if that helps

svrnm commented 2 months ago

Thanks, @alombarte! I have to admit that our terminology is not really clear/might be confusing, but it's really complicate to differentiate. There are three (or four?) different kinds of integrations so to speak:

The first and the third one is what we (=OpenTelemetry community) see as part of our mission (telemetry should be built in), and on that particular page, in that section we want to highlight that third possibility and then list libraries which are doing that: taking direct dependency on the opentelemetry api.

Note, that I am not saying that integrations in applications and first class "plugins" (or instrumentation libraries) are not what we love seeing, we just don't have a similar place to highlight them right now (and probably we should!), outside of the list of integrations and the registry (which you should add krakend-otel to, btw).

alombarte commented 2 months ago

Thanks, @svrnm, for the detailed explanation, I appreciate the effort.

I have one final question to make sure I completely understand. Is it a direct use of your Go library inside another library considered a native integration, or would that be a usage "from the outside"?

I'll have a look at the registry, thanks for pointing it out.

BTW: I just saw in the linked thread a comment from Fabri (sending you a hug @theletterf), what a small world, we worked in the same company for several years :)

theletterf commented 2 months ago

@alombarte It's a small world indeed! Glad to see KrakenD joining the family! :) Big hugs!

svrnm commented 2 months ago

I have one final question to make sure I completely understand. Is it a direct use of your Go library inside another library considered a native integration, or would that be a usage "from the outside"?

Ouh... not knowing all the inner workings of krakend-otel, but this could mean that the library integrating your library is doing a "native integration" while your library could be seen as a distribution. I have to admit, this is really complicated :lol:

There is one more thing I am thinking about related to this and another discussion we just had, I just need to find time to connect the dots and write it down, give me a little bit of time ;-)

Also, great to see the connection between @theletterf and you!