-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What to use for "provider" in fastifyOtelInstrumentation.setTracerProvider(provider) ? #23
Comments
For extra clarification, when starting a new project with Express I would normally just run auto-instrumentation using the following env var and not use a custom instrumentation.ts. NODE_OPTIONS="--require @opentelemetry/auto-instrumentations-node/register" Do I now need to set up the exporter and provider in the "OTEL setup" file with something like the following? const exporter = new CollectorTraceExporter();
const provider = new NodeTracerProvider({
resource: new Resource({
[SEMRESATTRS_SERVICE_NAME]: 'basic-service',
}),
spanProcessors: [
new SimpleSpanProcessor(exporter),
],
});
provider.register(); |
You can use the following testing file as reference: Line 29 in d75214d
Currently
Yes |
I see. I'll give it a try with other instrumentations as well e.g. @opentelemetry/instrumentation-nestjs-core Would we need to also instrument @opentelemetry/instrumentation-pino as well, or does |
Yes, it will require you to manually instrument it |
Prerequisites
Issue
Maybe it's sleep deprivation, but I've looked through various docs and I'm admittedly stumped. In the README.md example it states:
What should the value for the
provider
parameter (last line above) be if I'm using@fastify/otel
with @opentelemetry/auto-instrumentations-node?The text was updated successfully, but these errors were encountered: