elastic / elastic/apm-agent-nodejs

Bug report: metricset.interval stuck at 1m even when metricsInterval ≠ 1m (Node.js APM agent)

Open
#4,726 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
594
Forks
244
Avg merge
1d 8h
Merged PRs (30d)
16

Description

## Summary

When setting `metricsInterval: '180s'` in the Elastic APM Node.js agent, metrics are emitted every 3 minutes as expected. However, the ingested documents in Elasticsearch still show `metricset.interval: 1m`.

Image

## Steps to reproduce

1. Configure `elastic-apm-node.js`:

```js
module.exports = {
serviceName: 'my-next',
secretToken: 'xxxxxxxxx',
serverUrl: 'https://xxxxxxxxx.apm.asia-northeast1.gcp.cloud.es.io:443',
environment: 'my-environment',
metricsInterval: '180s',
};
```
2. Start the app.
3. In Kibana Discover, view `metricset.name: service_summary`.

## Actual result

* Documents appear every 3 minutes.
* `metricset.interval` is always `1m`.

## Expected result

* `metricset.interval` should reflect the configured `metricsInterval` (e.g., `3m` when set to `180s`).

## Impact

* Tools relying on `metricset.interval` may misinterpret the actual metric resolution.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.