Skip to content

Commit 3df9287

Browse files
add node runtime instrumentation (#997)
Co-authored-by: Adhitya Mamallan <adhitya.mamallan@uber.com>
1 parent 786de10 commit 3df9287

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

package-lock.json

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@opentelemetry/instrumentation-grpc": "^0.200.0",
3535
"@opentelemetry/instrumentation-http": "^0.200.0",
3636
"@opentelemetry/instrumentation-pino": "^0.50.0",
37+
"@opentelemetry/instrumentation-runtime-node": "^0.17.1",
3738
"@opentelemetry/instrumentation-undici": "^0.11.0",
3839
"@opentelemetry/propagator-jaeger": "^2.0.0",
3940
"@opentelemetry/resources": "^2.0.0",

src/utils/otel/otel-register-instrumentations.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ import {
1010
PinoInstrumentation,
1111
type PinoInstrumentationConfig,
1212
} from '@opentelemetry/instrumentation-pino';
13+
import {
14+
RuntimeNodeInstrumentation,
15+
type RuntimeNodeInstrumentationConfig,
16+
} from '@opentelemetry/instrumentation-runtime-node';
1317
import {
1418
UndiciInstrumentation,
1519
type UndiciInstrumentationConfig,
@@ -20,16 +24,19 @@ export function otelRegisterInstrumentations({
2024
httpInstrumentationConfig,
2125
undiciInstrumentationConfig,
2226
pinoInstrumentationConfig,
27+
runtimeNodeInstrumentationConfig,
2328
}: {
2429
grpcInstrumentationConfig?: GrpcInstrumentationConfig;
2530
httpInstrumentationConfig?: HttpInstrumentationConfig;
2631
undiciInstrumentationConfig?: UndiciInstrumentationConfig;
2732
pinoInstrumentationConfig?: PinoInstrumentationConfig;
33+
runtimeNodeInstrumentationConfig?: RuntimeNodeInstrumentationConfig;
2834
} = {}) {
2935
return [
3036
new GrpcInstrumentation(grpcInstrumentationConfig),
3137
new HttpInstrumentation(httpInstrumentationConfig),
3238
new UndiciInstrumentation(undiciInstrumentationConfig),
3339
new PinoInstrumentation(pinoInstrumentationConfig),
40+
new RuntimeNodeInstrumentation(runtimeNodeInstrumentationConfig),
3441
];
3542
}

0 commit comments

Comments
 (0)