Returns the Node.js runtime metrics instrumentation, which emits basic process gauges (event loop lag, GC, heap size).
Requires @opentelemetry/instrumentation-runtime-node to be installed in the host project.
@opentelemetry/instrumentation-runtime-node
an array containing one instrumentation instance, or empty if the package is not installed
import { setupOtel } from '@cleverbrush/otel';import { runtimeMetrics } from '@cleverbrush/otel/instrumentations';setupOtel({ serviceName: 'todo-backend', instrumentations: runtimeMetrics(),}); Copy
import { setupOtel } from '@cleverbrush/otel';import { runtimeMetrics } from '@cleverbrush/otel/instrumentations';setupOtel({ serviceName: 'todo-backend', instrumentations: runtimeMetrics(),});
Returns the Node.js runtime metrics instrumentation, which emits basic process gauges (event loop lag, GC, heap size).
Requires
@opentelemetry/instrumentation-runtime-nodeto be installed in the host project.