From 340639f4cb78c88e74da4caf91296b2e3da0a583 Mon Sep 17 00:00:00 2001 From: Naama Bendalak <74866605+8naama@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:49:30 +0200 Subject: [PATCH] fix nodejs metrics example --- docs/shipping/Code/node-js.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/shipping/Code/node-js.md b/docs/shipping/Code/node-js.md index 6dba65b1..fb45c14c 100644 --- a/docs/shipping/Code/node-js.md +++ b/docs/shipping/Code/node-js.md @@ -546,13 +546,14 @@ We recommend using this integration with [the Logz.io Metrics backend](https://a ```shell npm install logzio-nodejs-metrics-sdk@0.5.0 +npm install @opentelemetry/sdk-metrics@1.26.0 ``` ### Initialize the exporter and meter provider ```javascript -const MeterProvider = require('@opentelemetry/sdk-metrics-base'); +const { MeterProvider, PeriodicExportingMetricReader } = require('@opentelemetry/sdk-metrics-base'); const sdk = require('logzio-nodejs-metrics-sdk'); const collectorOptions = { @@ -937,4 +938,4 @@ helm uninstall logzio-k8s-telemetry - \ No newline at end of file +