autotelic / fastify-opentelemetry

A Fastify plugin that utilizes the OpenTelemetry API to provide request tracing.
MIT License
76 stars 12 forks source link

Comparison with @opentelemetry/instrumentation-fastify #45

Closed stefee closed 2 years ago

stefee commented 2 years ago

How does this project compare with the “official” OTEL package? I’m interested to know if there is a benefit to using this over the other.

gjuchault commented 2 years ago

Hello,

I think this comment explains it: https://github.com/autotelic/fastify-opentelemetry/issues/18#issuecomment-794729044

This project leverages plugins whereas the "official" package relies on module/require override — which can be a huge pain if you bundle your backend

stefee commented 2 years ago

Ah of course - that makes sense. It’s a Fastify plugin not an OTEL plugin. That actually makes a lot of sense. Bear in mind anyone using the auto node instrumentation will currently be getting the other one implicitly, so using this as well could cause duplication. I like this approach though.