Semantic Conventions for Node.js Runtime Metrics

Status: Experimental

This document describes semantic conventions for Node.js Runtime metrics in OpenTelemetry.

Experimental

Status: Experimental

Description: Experimental Node.js Runtime metrics captured under nodejs.

Note: The metrics for eventloop delay are split into separated values instead of a single histogram, because node runtime only returns single values through perf_hooks.monitorEventLoopDelay([options]) and not the entire histogram, so it’s not possible to convert it to an OpenTelemetry histogram.

Metric: nodejs.eventloop.delay.min

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
nodejs.eventloop.delay.minGaugesEvent loop minimum delay. [1]Experimental

[1]: Value can be retrieved from value histogram.min of perf_hooks.monitorEventLoopDelay([options])

Metric: nodejs.eventloop.delay.max

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
nodejs.eventloop.delay.maxGaugesEvent loop maximum delay. [1]Experimental

[1]: Value can be retrieved from value histogram.max of perf_hooks.monitorEventLoopDelay([options])

Metric: nodejs.eventloop.delay.mean

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
nodejs.eventloop.delay.meanGaugesEvent loop mean delay. [1]Experimental

[1]: Value can be retrieved from value histogram.mean of perf_hooks.monitorEventLoopDelay([options])

Metric: nodejs.eventloop.delay.stddev

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
nodejs.eventloop.delay.stddevGaugesEvent loop standard deviation delay. [1]Experimental

[1]: Value can be retrieved from value histogram.stddev of perf_hooks.monitorEventLoopDelay([options])

Metric: nodejs.eventloop.delay.p50

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
nodejs.eventloop.delay.p50GaugesEvent loop 50 percentile delay. [1]Experimental

[1]: Value can be retrieved from value histogram.percentile(50) of perf_hooks.monitorEventLoopDelay([options])

Metric: nodejs.eventloop.delay.p90

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
nodejs.eventloop.delay.p90GaugesEvent loop 90 percentile delay. [1]Experimental

[1]: Value can be retrieved from value histogram.percentile(90) of perf_hooks.monitorEventLoopDelay([options])

Metric: nodejs.eventloop.delay.p99

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
nodejs.eventloop.delay.p99GaugesEvent loop 99 percentile delay. [1]Experimental

[1]: Value can be retrieved from value histogram.percentile(99) of perf_hooks.monitorEventLoopDelay([options])

Metric: nodejs.eventloop.utilization

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStability
nodejs.eventloop.utilizationGauge1Event loop utilization. [1]Experimental

[1]: The value range is [0.0,1.0] and can be retrieved from value performance.eventLoopUtilization([utilization1[, utilization2]])