Skip to content

Commit 027d84b

Browse files
committed
Add host-metrics instrumentation to telemetry client
1 parent 803dfa9 commit 027d84b

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';
@@ -81,6 +82,10 @@ class TelemetryClientSingleton {
8182
const instrumentations = [
8283
...Instrumentation.CommonInstrumentations.minimal(),
8384
new KoaInstrumentation(),
85+
new HostMetricsInstrumentation({
86+
name: 'host-metrics-instrumentation',
87+
meterProvider: metricsClient.provider(),
88+
}),
8489
];
8590

8691
telemetryClient.registerInstrumentations(instrumentations);

0 commit comments

Comments
 (0)