@opentelemetry/exporter-prometheus
Advanced tools
Comparing version 0.8.0 to 0.8.1
@@ -16,3 +16,3 @@ /*! | ||
*/ | ||
export declare const VERSION = "0.8.0"; | ||
export declare const VERSION = "0.8.1"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -19,3 +19,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.8.0'; | ||
exports.VERSION = '0.8.1'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/exporter-prometheus", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus", | ||
@@ -47,6 +47,6 @@ "main": "build/src/index.js", | ||
"gts": "^1.1.0", | ||
"mocha": "^6.2.2", | ||
"mocha": "^7.1.2", | ||
"nyc": "^15.0.0", | ||
"rimraf": "^3.0.0", | ||
"ts-mocha": "^6.0.0", | ||
"ts-mocha": "^7.0.0", | ||
"ts-node": "^8.6.2", | ||
@@ -58,7 +58,7 @@ "tslint-consistent-codestyle": "^1.16.0", | ||
"dependencies": { | ||
"@opentelemetry/api": "^0.8.0", | ||
"@opentelemetry/core": "^0.8.0", | ||
"@opentelemetry/metrics": "^0.8.0", | ||
"@opentelemetry/api": "^0.8.1", | ||
"@opentelemetry/core": "^0.8.1", | ||
"@opentelemetry/metrics": "^0.8.1", | ||
"prom-client": "^11.5.3" | ||
} | ||
} |
@@ -38,8 +38,11 @@ # OpenTelemetry Prometheus Metric Exporter | ||
// Now, start recording data | ||
const counter = meter.createCounter('metric_name'); | ||
counter.add(10, { [key]: 'value' }); | ||
const counter = meter.createCounter('metric_name', { | ||
labelKeys: ['pid'], | ||
description: 'Example of a counter' | ||
}); | ||
counter.add(10, { pid: process.pid }); | ||
// Record data using Instrument: It is recommended to keep a reference to the Bound Instrument instead of | ||
// always calling `bind()` method for every operations. | ||
const boundCounter = counter.bind({ [key]: 'value' }); | ||
const boundCounter = counter.bind({ pid: process.pid }); | ||
boundCounter.add(10); | ||
@@ -46,0 +49,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36958
76
Updated@opentelemetry/api@^0.8.1
Updated@opentelemetry/core@^0.8.1