Skip to content

Commit

Permalink
chore(prom-client) change version and fix README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pikalovArtemN committed Apr 22, 2024
1 parent 046072e commit d7c5108
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions plugins/node/instrumentation-runtime-node/README.md
Expand Up @@ -26,7 +26,7 @@ const prometheusExporter = new PrometheusExporter({
const sdk = new NodeSDK({
metricReader: prometheusExporter,
instrumentations: [new RuntimeNodeInstrumentation({
eventLoopUtilizationMeasurementInterval: 5000,
monitoringPrecision: 5000,
})],
});

Expand All @@ -44,7 +44,7 @@ Go to [`localhost:9464/metrics`](http://localhost:9464/metrics), and you should
nodejs_performance_event_loop_utilization 0.010140079547955264
```

> Metrics will only be exported after it has collected two ELU readings (at least approximately `RuntimeNodeInstrumentationConfig.eventLoopUtilizationMeasurementInterval` milliseconds after initialization). Otherwise, you may see:
> Metrics will only be exported after it has collected two ELU readings (at least approximately `RuntimeNodeInstrumentationConfig.monitoringPrecision` milliseconds after initialization). Otherwise, you may see:
>
> ```txt
> # no registered metrics
Expand All @@ -56,7 +56,7 @@ nodejs_performance_event_loop_utilization 0.010140079547955264

| name | type | unit | default | description |
|---|---|---|---|---|
| [`eventLoopUtilizationMeasurementInterval`](./src/types.ts#L25) | `int` | millisecond | `5000` | The approximate number of milliseconds for which to calculate event loop utilization averages. A larger value will result in more accurate averages at the expense of less granular data. Should be set to below the scrape interval of your metrics collector to avoid duplicated data points. |
| [`monitoringPrecision`](./src/types.ts#L25) | `int` | millisecond | `5000` | The approximate number of milliseconds for which to calculate event loop utilization averages. A larger value will result in more accurate averages at the expense of less granular data. Should be set to below the scrape interval of your metrics collector to avoid duplicated data points. |

## Supported Node.js versions

Expand Down
2 changes: 1 addition & 1 deletion plugins/node/instrumentation-runtime-node/package.json
@@ -1,6 +1,6 @@
{
"name": "@opentelemetry/instrumentation-runtime-node",
"version": "0.3.0",
"version": "0.4.0",
"description": "OpenTelemetry Node.js Performance measurement API automatic instrumentation package",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand Down

0 comments on commit d7c5108

Please sign in to comment.