Skip to content

Commit

Permalink
Update @opentelemetry/metrics to @opentelemetry/sdk-metrics-base. (#1061
Browse files Browse the repository at this point in the history
)
  • Loading branch information
MrMYHuang authored Jan 20, 2022
1 parent bdb7130 commit 0e4ee0a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions content/en/docs/instrumentation/js/getting-started/nodejs.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ The following dependencies are required to collect metrics in your Node.js appli

These dependencies are required to configure the tracing SDK and create spans.

- `@opentelemetry/metrics`
- `@opentelemetry/sdk-metrics-base`

#### Exporter

Expand All @@ -223,7 +223,7 @@ Create a file named `monitoring.js` and add the following code:
/* monitoring.js */
'use strict';

const { MeterProvider, ConsoleMetricExporter } = require('@opentelemetry/metrics');
const { MeterProvider, ConsoleMetricExporter } = require('@opentelemetry/sdk-metrics-base');

const meter = new MeterProvider({
exporter: new ConsoleMetricExporter(),
Expand All @@ -239,7 +239,7 @@ Let's create and export from your `monitoring.js` file a middleware function tha
/* monitoring.js */
'use strict';

const { MeterProvider, ConsoleMetricExporter } = require('@opentelemetry/metrics');
const { MeterProvider, ConsoleMetricExporter } = require('@opentelemetry/sdk-metrics-base');

const meter = new MeterProvider({
exporter: new ConsoleMetricExporter(),
Expand Down Expand Up @@ -286,7 +286,7 @@ Now when you make requests to your service, your meter will count all requests.
First, install the dependencies as described above. Here you need to add the following:

```shell
npm install --save @opentelemetry/metrics
npm install --save @opentelemetry/sdk-metrics-base
```

Now you can run your application:
Expand Down

0 comments on commit 0e4ee0a

Please sign in to comment.