Skip to content

Commit 5b5146d

Browse files
committed
Add host-metrics instrumentation to telemetry client
1 parent 41f7dee commit 5b5146d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/service/telemetry/client.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
import { APP } from '../../constants';
1010
import { TelemetryClient } from '@vtex/diagnostics-nodejs/dist/telemetry';
1111
import { KoaInstrumentation } from '@opentelemetry/instrumentation-koa';
12+
import { HostMetricsInstrumentation } from '../metrics/instruments/hostMetrics';
1213

1314
const CLIENT_NAME = APP.NAME || 'node-vtex-api';
1415
const APPLICATION_ID = APP.ID || 'vtex-io-app';
@@ -79,6 +80,10 @@ class TelemetryClientSingleton {
7980
const instrumentations = [
8081
...Instrumentation.CommonInstrumentations.minimal(),
8182
new KoaInstrumentation(),
83+
new HostMetricsInstrumentation({
84+
name: 'host-metrics-instrumentation',
85+
meterProvider: metricsClient.provider(),
86+
}),
8287
];
8388

8489
telemetryClient.registerInstrumentations(instrumentations);

0 commit comments

Comments
 (0)