Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
- Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
meenal-developer committed Dec 29, 2023
1 parent 150d853 commit 73f9396
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@middleware.io/node-apm",
"version": "1.2.5",
"version": "1.2.6",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
6 changes: 4 additions & 2 deletions packages/metrics-collector.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,16 @@ module.exports.init = (config) => {
[SemanticResourceAttributes.SERVICE_NAME]: this.serviceName,
['mw_agent']: true,
['project.name']: this.projectName,
['mw.account_key']:config.accessToken
['mw.account_key']:config.accessToken,
['runtime.metrics.nodejs']:true,
['mw.app.lang']:"nodejs",
})
});
this.meterProvider.addMetricReader(new PeriodicExportingMetricReader({
exporter: metricsExporter,
exportIntervalMillis: 10000,
}));
this.meter = this.meterProvider.getMeter('node-app-meter');
this.meter = this.meterProvider.getMeter(this.serviceName);
this.counter = this.meter.createCounter(metric_name);
this.counter.add(parseFloat(this.enqueue[metric_name]));
}
Expand Down

0 comments on commit 73f9396

Please sign in to comment.