@opentelemetry/exporter-prometheus
Advanced tools
Comparing version 0.13.0 to 0.14.0
@@ -13,2 +13,7 @@ import * as api from '@opentelemetry/api'; | ||
/** | ||
* Append timestamp to metrics | ||
* @default true | ||
*/ | ||
appendTimestamp?: boolean; | ||
/** | ||
* Endpoint the metrics should be exposed at with preceding slash | ||
@@ -15,0 +20,0 @@ * @default '/metrics' |
@@ -9,2 +9,3 @@ import { ExportResult } from '@opentelemetry/core'; | ||
prefix: string; | ||
appendTimestamp: boolean; | ||
}; | ||
@@ -16,2 +17,3 @@ private readonly _logger; | ||
private readonly _prefix?; | ||
private readonly _appendTimestamp; | ||
private _serializer; | ||
@@ -18,0 +20,0 @@ private _batcher; |
@@ -72,4 +72,8 @@ "use strict"; | ||
this._prefix = config.prefix || PrometheusExporter.DEFAULT_OPTIONS.prefix; | ||
this._appendTimestamp = | ||
typeof config.appendTimestamp === 'boolean' | ||
? config.appendTimestamp | ||
: PrometheusExporter.DEFAULT_OPTIONS.appendTimestamp; | ||
this._server = http_1.createServer(this._requestHandler); | ||
this._serializer = new PrometheusSerializer_1.PrometheusSerializer(this._prefix); | ||
this._serializer = new PrometheusSerializer_1.PrometheusSerializer(this._prefix, this._appendTimestamp); | ||
this._endpoint = (config.endpoint || PrometheusExporter.DEFAULT_OPTIONS.endpoint).replace(/^([^/])/, '/$1'); | ||
@@ -157,3 +161,4 @@ if (config.preventServerStart !== true) { | ||
prefix: '', | ||
appendTimestamp: true, | ||
}; | ||
//# sourceMappingURL=PrometheusExporter.js.map |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.13.0"; | ||
export declare const VERSION = "0.14.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.13.0'; | ||
exports.VERSION = '0.14.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/exporter-prometheus", | ||
"version": "0.13.0", | ||
"version": "0.14.0", | ||
"description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus", | ||
@@ -44,4 +44,4 @@ "main": "build/src/index.js", | ||
"devDependencies": { | ||
"@types/mocha": "8.0.4", | ||
"@types/node": "14.14.10", | ||
"@types/mocha": "8.2.0", | ||
"@types/node": "14.14.12", | ||
"codecov": "3.8.1", | ||
@@ -53,11 +53,11 @@ "gts": "2.0.2", | ||
"ts-mocha": "8.0.0", | ||
"ts-node": "9.0.0", | ||
"ts-node": "9.1.1", | ||
"typescript": "3.9.7" | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/api": "^0.13.0", | ||
"@opentelemetry/core": "^0.13.0", | ||
"@opentelemetry/metrics": "^0.13.0" | ||
"@opentelemetry/api": "^0.14.0", | ||
"@opentelemetry/core": "^0.14.0", | ||
"@opentelemetry/metrics": "^0.14.0" | ||
}, | ||
"gitHead": "86cbd6798f9318c5920f9d9055f289a1c3f26500" | ||
"gitHead": "27a8d4530c56257c191468b073669909bf8892a1" | ||
} |
Sorry, the diff of this file is not supported yet
49825
589
+ Added@opentelemetry/api@0.14.0(transitive)
+ Added@opentelemetry/context-base@0.14.0(transitive)
+ Added@opentelemetry/core@0.14.0(transitive)
+ Added@opentelemetry/metrics@0.14.0(transitive)
+ Added@opentelemetry/resources@0.14.0(transitive)
- Removed@opentelemetry/api@0.13.0(transitive)
- Removed@opentelemetry/context-base@0.13.0(transitive)
- Removed@opentelemetry/core@0.13.0(transitive)
- Removed@opentelemetry/metrics@0.13.0(transitive)
- Removed@opentelemetry/resources@0.13.0(transitive)
Updated@opentelemetry/api@^0.14.0
Updated@opentelemetry/core@^0.14.0