-
-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Fastify version
5.2.1
Plugin version
0.2.0
Node.js version
22.12.0
Operating system
Linux
Operating system version (i.e. 20.04, 11.3, 10)
alpine 3.21.2
Description
Hey,
I think this is a bug, when I am sending my otel data via grpc to new relic endpoint, instead of seeing all traces defined under service.name equal to my OTEL_SERVICE_NAME, I see them divided into mine OTEL_SERVICE_NAME and fastify service.name.
This ends up in having two different entities in my new relic dashboard, I can fix this by doing something like this.
export const fastifyOtelInstrumentation = new FastifyOtelInstrumentation({
servername: process.env.OTEL_SERVICE_NAME,
});
I would expect this library to behave as defined in General SDK Configuration (Documentation) of OTEL.
https://opentelemetry.io/docs/languages/sdk-configuration/general/#otel_service_name
Kind Regards,
Tomasz.
Link to code that reproduces the bug
None
Expected Behavior
If I do not provide any configuration options for FastifyOtelInstrumentation, it should set servername default configuration option to environment variable OTEL_SERVICE_NAME, as a result it will create spans with service.name equal to it.