@fastify/otel
Version:
Official Fastify OpenTelemetry Instrumentation
10 lines (8 loc) • 378 B
JavaScript
// ... in your OTEL setup
const { FastifyOtelInstrumentation } = require('.')
// If serverName is not provided, it will fallback to OTEL_SERVICE_NAME
// as per https://opentelemetry.io/docs/languages/sdk-configuration/general/.
const fastifyOtelInstrumentation = new FastifyOtelInstrumentation({
servername: '<yourCustomApplicationName>',
registerOnInitialization: true
})