/node-red-contrib-opentelemetry

Node-red node for distributed tracing with OpenTelemetry SDK

Primary LanguageJavaScriptGNU Affero General Public License v3.0AGPL-3.0

Node-RED OpenTelemetry

license: AGPLv3 GitHub release GitHub Lint Workflow Status GitHub Publish Workflow Status npm

Distributed tracing with OpenTelemetry SDK for Node-RED.

Key features

  • based on messaging hooks:
    • create spans on onSend(source) and postDeliver(destination) events,
    • end spans on onComplete and postDeliver(source) events.
  • trace includes:
    • message id,
    • flow id,
    • node id,
    • node type,
    • node name (if filled),
    • hostname,
    • optionally http status code (for request node type),
    • optionally exception.

Example

Installation

Search node-red-contrib-opentelemetry within the palette manager or install with npm from the command-line (within your user data directory):

npm install node-red-contrib-opentelemetry

Usage

  • Add OTEL node once (to any flow),
  • Setup the node:
    • set OTEL exporter url (example for Jaeger: http://localhost:4318/v1/traces),
    • define a service name (will be displayed as span service),
    • define an optional root span prefix (will be added in Node-RED root span name),
    • define nodes that should not send traces (using comma-separated list like debug,catch),
    • define nodes that should propagate W3C trace context (in http request headers, using comma-separated list like http request,my-custom-node),
    • define time in seconds after which an unmodified message will be ended and deleted,

Versioning

node-red-contrib-opentelemetry is maintained under the semantic versioning guidelines.

See the releases on this repository for changelog.

License

This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details