@opentelemetry/exporter-prometheus
Advanced tools
Comparing version 0.9.0 to 0.10.0
@@ -132,10 +132,18 @@ "use strict"; | ||
if (metric instanceof prom_client_1.Gauge) { | ||
if (record.aggregator instanceof metrics_1.CounterSumAggregator) { | ||
metric.set(labels, point.value); | ||
if (typeof point.value === 'number') { | ||
if (record.descriptor.metricKind === metrics_1.MetricKind.VALUE_OBSERVER || | ||
record.descriptor.metricKind === metrics_1.MetricKind.VALUE_RECORDER) { | ||
metric.set(labels, point.value, core_1.hrTimeToMilliseconds(point.timestamp)); | ||
} | ||
else { | ||
metric.set(labels, point.value); | ||
} | ||
} | ||
else if (record.aggregator instanceof metrics_1.ObserverAggregator) { | ||
metric.set(labels, point.value, core_1.hrTimeToMilliseconds(point.timestamp)); | ||
else if (point.value.buckets) { | ||
metric.set(labels, point.value.sum, core_1.hrTimeToMilliseconds(point.timestamp)); | ||
} | ||
else if (typeof point.value.last === 'number') { | ||
metric.set(labels, point.value.last, core_1.hrTimeToMilliseconds(point.timestamp)); | ||
} | ||
} | ||
// TODO: only counter and gauge are implemented in metrics so far | ||
} | ||
@@ -175,3 +183,6 @@ _registerMetric(record) { | ||
return new prom_client_1.Gauge(metricObject); | ||
case metrics_1.MetricKind.OBSERVER: | ||
// case MetricKind.VALUE_RECORDER: | ||
// case MetricKind.SUM_OBSERVER: | ||
// case MetricKind.UP_DOWN_SUM_OBSERVER: | ||
case metrics_1.MetricKind.VALUE_OBSERVER: | ||
return new prom_client_1.Gauge(metricObject); | ||
@@ -178,0 +189,0 @@ default: |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.9.0"; | ||
export declare const VERSION = "0.10.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.9.0'; | ||
exports.VERSION = '0.10.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/exporter-prometheus", | ||
"version": "0.9.0", | ||
"version": "0.10.0", | ||
"description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus", | ||
@@ -34,2 +34,3 @@ "main": "build/src/index.js", | ||
"build/src/**/*.js", | ||
"build/src/**/*.js.map", | ||
"build/src/**/*.d.ts", | ||
@@ -44,5 +45,5 @@ "doc", | ||
"devDependencies": { | ||
"@types/mocha": "7.0.2", | ||
"@types/node": "14.0.13", | ||
"codecov": "3.7.0", | ||
"@types/mocha": "8.0.0", | ||
"@types/node": "14.0.25", | ||
"codecov": "3.7.2", | ||
"gts": "2.0.2", | ||
@@ -54,10 +55,11 @@ "mocha": "7.2.0", | ||
"ts-node": "8.10.2", | ||
"typescript": "3.9.5" | ||
"typescript": "3.9.7" | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/api": "^0.9.0", | ||
"@opentelemetry/core": "^0.9.0", | ||
"@opentelemetry/metrics": "^0.9.0", | ||
"@opentelemetry/api": "^0.10.0", | ||
"@opentelemetry/core": "^0.10.0", | ||
"@opentelemetry/metrics": "^0.10.0", | ||
"prom-client": "^11.5.3" | ||
} | ||
}, | ||
"gitHead": "ab62a4d69b99b3a8c9c26100c04f3226af7859df" | ||
} |
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
40852
15
456
+ Added@opentelemetry/api@0.10.2(transitive)
+ Added@opentelemetry/context-base@0.10.2(transitive)
+ Added@opentelemetry/core@0.10.2(transitive)
+ Added@opentelemetry/metrics@0.10.2(transitive)
+ Added@opentelemetry/resources@0.10.2(transitive)
- Removed@opentelemetry/api@0.9.0(transitive)
- Removed@opentelemetry/context-base@0.9.0(transitive)
- Removed@opentelemetry/core@0.9.0(transitive)
- Removed@opentelemetry/metrics@0.9.0(transitive)
- Removed@opentelemetry/resources@0.9.0(transitive)
Updated@opentelemetry/api@^0.10.0
Updated@opentelemetry/core@^0.10.0