HeronJS can publish application performance and tracing data through OpenTelemetry-compatible exporters. This is useful when you want to send traces to systems such as SigNoz, Zipkin, or Jaeger.
Install the required packages
To enable APM, install the HeronJS performance package and the exporter for your tracing backend.
npm i @heronjs/perf @opentelemetry/exporter-zipkinIf you are using another backend, install the matching OpenTelemetry exporter instead.
Create the configuration file
HeronJS reads APM settings from heronjs.config.js at the root of your project.
module.exports = {
apm: {
identity: 'todo-service',
exporter: {
client: 'zipkin',
type: 'remote',
},
endpoint: {
zipkin: {
url: 'http://localhost:9411/api/v2/spans',
},
},
},
};In this configuration:
identityis the service name reported to the tracing backend.exporter.clientselects the exporter implementation such aszipkin,jaeger, orsignoz.exporter.typecontrols whether traces are sent remotely or printed locally.endpointdefines the destination for the selected exporter.
Once configured, HeronJS can export trace data to your observability platform for monitoring and troubleshooting.
Last updated on