New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@opentelemetry/exporter-prometheus

Package Overview
Dependencies
Maintainers
4
Versions
189
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/exporter-prometheus - npm Package Compare versions

Comparing version 0.11.0 to 0.11.1-alpha.15

11

build/src/PrometheusExporter.d.ts

@@ -40,17 +40,12 @@ import { ExportResult } from '@opentelemetry/core';

* Shuts down the export server and clears the registry
*
* @param cb called when server is stopped
*/
shutdown(cb?: () => void): void;
shutdown(): Promise<void>;
/**
* Stops the Prometheus export server
* @param callback A callback that will be executed once the server is stopped
*/
stopServer(callback?: () => void): void;
stopServer(): Promise<void>;
/**
* Starts the Prometheus export server
*
* @param callback called once the server is ready
*/
startServer(callback?: () => void): void;
startServer(): Promise<void>;
/**

@@ -57,0 +52,0 @@ * Request handler used by http library to respond to incoming requests

@@ -76,3 +76,3 @@ "use strict";

if (config.startServer || PrometheusExporter.DEFAULT_OPTIONS.startServer) {
this.startServer(callback);
this.startServer().then(callback);
}

@@ -111,25 +111,28 @@ else if (callback) {

* Shuts down the export server and clears the registry
*
* @param cb called when server is stopped
*/
shutdown(cb) {
this.stopServer(cb);
shutdown() {
return this.stopServer();
}
/**
* Stops the Prometheus export server
* @param callback A callback that will be executed once the server is stopped
*/
stopServer(callback) {
stopServer() {
if (!this._server) {
this._logger.debug('Prometheus stopServer() was called but server was never started.');
if (callback) {
callback();
}
return Promise.resolve();
}
else {
this._server.close(() => {
this._logger.debug('Prometheus exporter was stopped');
if (callback) {
callback();
}
return new Promise(resolve => {
this._server.close(err => {
if (!err) {
this._logger.debug('Prometheus exporter was stopped');
}
else {
if (err.code !==
'ERR_SERVER_NOT_RUNNING') {
this._logger.error(`Error during stopping the Prometheus Exporter "${err.message}"`);
}
}
resolve();
});
});

@@ -140,11 +143,9 @@ }

* Starts the Prometheus export server
*
* @param callback called once the server is ready
*/
startServer(callback) {
this._server.listen(this._port, () => {
this._logger.debug(`Prometheus exporter started on port ${this._port} at endpoint ${this._endpoint}`);
if (callback) {
callback();
}
startServer() {
return new Promise(resolve => {
this._server.listen(this._port, () => {
this._logger.debug(`Prometheus exporter started on port ${this._port} at endpoint ${this._endpoint}`);
resolve();
});
});

@@ -151,0 +152,0 @@ }

@@ -1,2 +0,2 @@

export declare const VERSION = "0.11.0";
export declare const VERSION = "0.11.1-alpha.15+e170039";
//# sourceMappingURL=version.d.ts.map

@@ -20,3 +20,3 @@ "use strict";

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.11.0';
exports.VERSION = '0.11.1-alpha.15+e170039';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/exporter-prometheus",
"version": "0.11.0",
"version": "0.11.1-alpha.15+e170039",
"description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus",

@@ -56,7 +56,7 @@ "main": "build/src/index.js",

"dependencies": {
"@opentelemetry/api": "^0.11.0",
"@opentelemetry/core": "^0.11.0",
"@opentelemetry/metrics": "^0.11.0"
"@opentelemetry/api": "^0.11.1-alpha.15+e170039",
"@opentelemetry/core": "^0.11.1-alpha.15+e170039",
"@opentelemetry/metrics": "^0.11.1-alpha.15+e170039"
},
"gitHead": "15174c6647ab9863dfc1424412fa60f2fddb3351"
"gitHead": "e170039015e8a1a7419bb835a00659b2a734b8a6"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc