@greenyellowbr/nestjs-observability
TypeScript icon, indicating that this package has built-in type declarations

0.0.0 • Public • Published

NestJs Observability Lib

OpenTelemetry module for Nest.

This repository is based on a fork of NestJs Otel, more tailored for the use we make inside our organization.

What's Included

  • 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

Prerequisites

  • Node 14+
  • NestJs 7+

How to Install

Install

npm i @gy/nestjs-observability --save-dev
yarn add @gy/nestjs-observability

Configure the Env Vars

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%

How to Use

Please refer to each module own documentation:

How to Contribute

  • After the improovements are done, bump the version in package.json
  • Run npm publish

Readme

Keywords

Package Sidebar

Install

npm i @greenyellowbr/nestjs-observability

Weekly Downloads

0

Version

0.0.0

License

Apache-2.0

Unpacked Size

271 kB

Total Files

117

Last publish

Collaborators

  • jurandir.santos
  • julioantonini
  • fversehgi