@saidsef/tracing-node
v3.13.1
Published
tracing NodeJS - Wrapper for OpenTelemetry instrumentation packages
Readme
Opentelemetry Wrapper for Tracing Node Applications
Get telemetry for your app in less than 3 minutes!
Effortlessly supercharge your applications with world-class distributed tracing! This OpenTelemetry wrapper delivers seamless, lightning-fast observability, empowering developers to monitor, debug, and optimise microservices with ease. Designed for modern cloud-native environments, it's the smart choice for engineers who demand reliability, scalability, and actionable insights. Get started in minutes and unlock the full potential of your service architecture—no fuss, just results. This is to make instrumentation (more) idempotent.
Features
| Feature | Description | |---------|-------------| | HTTP/HTTPS instrumentation | Automatic service detection | | Express.js support | Framework instrumentation | | Elasticsearch client | Database instrumentation | | IORedis client | Cache instrumentation | | AWS SDK | Cloud service instrumentation | | Pino logger | Integration with trace/span IDs | | DNS/FS instrumentation | Optional monitoring | | Resource detection | Host, OS, process, container | | W3C Trace Context | Standard propagation |
Prerequisites
- NodeJS
- Observability
- ...
- Profit?
Instalation
npm install @saidsef/tracing-node --saveUsage
You can set required params via env variables or function:
Env vars: | Environment Variable | Description | Required | |-----------------------|----------------------------| --------- | | CONTAINER_NAME/HOSTNAME| Container or pod hostname | No | | ENDPOINT | Tracing collector endpoint | Yes | | SERVICE_NAME | Service/application name | Yes |
Function args
import { setupTracing } from '@saidsef/tracing-node';
setupTracing({hostname: 'hostname', serviceName: 'service_name', url: 'endpoint'});Required Parameters are
| Name | Type | Description| Required | Default |
|----- | ---- | ------------- | ----- | ---- |
| hostname | string | container / pod hostname | No | hostname |
| serviceName | string | service / application name | Yes | n/a |
| url | string | tracing endpoint i.e. <schema>://<host>:<port> | Yes | n/a |
| enableFsInstrumentation | boolean | enable FS instrumentation | No | false |
| enableDnsInstrumentation | boolean | enable DNS instrumentation | No | false |
Source
Our latest and greatest source of tracing-node can be found on GitHub. Fork us!
Contributing
We would :heart: you to contribute by making a pull request.
Please read the official Contribution Guide for more information on how you can contribute.
