@open-infra/telemetry-fastify
v0.2.0
Published
Fastify request lifecycle enrichment for OpenInfra telemetry.
Maintainers
Readme
@open-infra/telemetry-fastify
Fastify HTTP request span enrichment.
Install
npm install @open-infra/telemetry-fastify fastifyES modules with TypeScript declarations. Node.js 20.11 or newer; browser bindings require a browser bundler. Use synchronized versions of the OpenInfra telemetry packages.
Usage
Register fastifyTelemetry before defining routes: await app.register(fastifyTelemetry). The plugin applies request, error, and response hooks to application routes. Start server telemetry before importing Fastify. Hooks enrich the active HTTP span with route, status, request ID, and duration.
Lifecycle and limits
Application runtimes own startup, consent, batching, and shutdown. Queues are bounded and can drop records under pressure. Framework adapters enrich existing spans rather than creating a second request span or provider. Keep browser gateway credentials on the server.
Getting started · Operations · Delivery semantics
Apache-2.0.
