OpenTelemetry module for Nest.
This repository is based on a fork of NestJs Otel, more tailored for the use we make inside our organization.
- Pino Logger
- OpenTelemetry + Node Auto Instrumentation
- Prometheus Metric Endpoint
The general idea is to:
- Have Pino Logger providing JSON-Text logs to stdout that will be captured by Promtail
- Have a /metrics endpoint with prometheus metric data that will be captured by their Service Discovery system
- Have a Tracing framework that will publish traces in the Jeager format to Grafana Tempo
- Node 14+
- NestJs 7+
npm i @gy/nestjs-observability --save-dev
yarn add @gy/nestjs-observability
You need to pass the Telemetry endpoint via environment variables. The endpoint will depend on where your Jaeger Collection will be deployed.
OTEL_SERVICE_NAME=ams-backoffice-api
OTEL_EXPORTER_JAEGER_ENDPOINT=http://localhost:14268/api/traces%
Please refer to each module own documentation:
- After the improovements are done, bump the version in
package.json
- Run
npm publish