@opentelemetry/exporter-prometheus
Advanced tools
Comparing version 0.16.1-alpha.19 to 0.16.1-alpha.20
@@ -1,2 +0,1 @@ | ||
import * as api from '@opentelemetry/api'; | ||
/** | ||
@@ -39,5 +38,3 @@ * Configuration interface for prometheus exporter | ||
preventServerStart?: boolean; | ||
/** Standard logging interface */ | ||
logger?: api.Logger; | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
@@ -14,3 +14,2 @@ /// <reference types="node" /> | ||
}; | ||
private readonly _logger; | ||
private readonly _host?; | ||
@@ -17,0 +16,0 @@ private readonly _port; |
@@ -19,3 +19,3 @@ "use strict"; | ||
exports.PrometheusExporter = void 0; | ||
const api = require("@opentelemetry/api"); | ||
const api_1 = require("@opentelemetry/api"); | ||
const core_1 = require("@opentelemetry/core"); | ||
@@ -71,3 +71,2 @@ const http_1 = require("http"); | ||
}; | ||
this._logger = config.logger || new api.NoopLogger(); | ||
this._host = | ||
@@ -92,3 +91,3 @@ config.host || | ||
.then(callback) | ||
.catch(err => this._logger.error(err)); | ||
.catch(err => api_1.diag.error(err)); | ||
} | ||
@@ -119,3 +118,3 @@ else if (callback) { | ||
} | ||
this._logger.debug('Prometheus exporter export'); | ||
api_1.diag.debug('Prometheus exporter export'); | ||
for (const record of records) { | ||
@@ -137,3 +136,3 @@ this._batcher.process(record); | ||
if (!this._server) { | ||
this._logger.debug('Prometheus stopServer() was called but server was never started.'); | ||
api_1.diag.debug('Prometheus stopServer() was called but server was never started.'); | ||
return Promise.resolve(); | ||
@@ -145,3 +144,3 @@ } | ||
if (!err) { | ||
this._logger.debug('Prometheus exporter was stopped'); | ||
api_1.diag.debug('Prometheus exporter was stopped'); | ||
} | ||
@@ -168,3 +167,3 @@ else { | ||
}, () => { | ||
this._logger.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`); | ||
api_1.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`); | ||
resolve(); | ||
@@ -171,0 +170,0 @@ }); |
{ | ||
"name": "@opentelemetry/exporter-prometheus", | ||
"version": "0.16.1-alpha.19+03e741bc", | ||
"version": "0.16.1-alpha.20+62f8695d", | ||
"description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus", | ||
@@ -56,8 +56,8 @@ "main": "build/src/index.js", | ||
"dependencies": { | ||
"@opentelemetry/api": "^0.16.0", | ||
"@opentelemetry/api-metrics": "^0.16.0", | ||
"@opentelemetry/core": "^0.16.0", | ||
"@opentelemetry/metrics": "^0.16.0" | ||
"@opentelemetry/api": "^0.16.1-alpha.20+62f8695d", | ||
"@opentelemetry/api-metrics": "^0.16.1-alpha.20+62f8695d", | ||
"@opentelemetry/core": "^0.16.1-alpha.20+62f8695d", | ||
"@opentelemetry/metrics": "^0.16.1-alpha.20+62f8695d" | ||
}, | ||
"gitHead": "03e741bc8404d44e899bbb80baa75bc321e4630a" | ||
"gitHead": "62f8695d3fe5309c62418a1043bc6e8a176bc11f" | ||
} |
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
51232
620
+ Added@opentelemetry/api@0.16.1-alpha.20(transitive)
+ Added@opentelemetry/api-metrics@0.16.1-alpha.20(transitive)
+ Added@opentelemetry/core@0.16.1-alpha.20(transitive)
+ Added@opentelemetry/metrics@0.16.1-alpha.20(transitive)
+ Added@opentelemetry/resources@0.16.1-alpha.20(transitive)
- Removed@opentelemetry/api@0.16.0(transitive)
- Removed@opentelemetry/api-metrics@0.16.0(transitive)
- Removed@opentelemetry/core@0.16.0(transitive)
- Removed@opentelemetry/metrics@0.16.0(transitive)
- Removed@opentelemetry/resources@0.16.0(transitive)