autotelic / fastify-opentelemetry

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

`serviceName` in plugin config #52

Closed alphaone closed 1 year ago

alphaone commented 1 year ago

Hey,

First, I want to thank you for working on this library. It is very much appreciated 🙏

Looking at the example I can see :

  await fastify.register(fastifyOpentelemetry, { serviceName: 'basic-example', wrapRoutes: true })

When I try to use serviceName as an config option in my code I get an error, that serviceName is not supported as an option: Object literal may only specify known properties, and 'serviceName' does not exist in type 'FastifyRegisterOptions<OpenTelemetryPluginOptions>'.

I was wondering, if this option was removed or is only planned for future releases 🤔

SeanReece commented 1 year ago

I also noticed the same thing. Looks like it was removed https://github.com/autotelic/fastify-opentelemetry/pull/41#issue-954735408

HW13 commented 1 year ago

Thanks for bringing this to our attention @alphaone and thanks @SeanReece for linking the PR! Looks like we forgot to remove serviceName usage from the example after removing the option. Would either of you be willing to open a PR to update the example?