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.19.1-alpha.37 to 0.19.1-alpha.38

18

build/src/PrometheusSerializer.js

@@ -52,2 +52,18 @@ "use strict";

}
/**
* @private
*
* Helper method which assists in enforcing the naming conventions for metric
* names in Prometheus
* @param name the name of the metric
* @param kind the kind of metric
* @returns string
*/
function enforcePrometheusNamingConvention(name, kind) {
// Prometheus requires that metrics of the Counter kind have "_total" suffix
if (!name.endsWith('_total') && kind === metrics_1.MetricKind.COUNTER) {
name = name + '_total';
}
return name;
}
function valueString(value) {

@@ -125,2 +141,3 @@ if (Number.isNaN(value)) {

}
name = enforcePrometheusNamingConvention(name, checkpoint.descriptor.metricKind);
const help = `# HELP ${name} ${escapeString(checkpoint.descriptor.description || 'description missing')}`;

@@ -135,2 +152,3 @@ const type = `# TYPE ${name} ${toPrometheusType(checkpoint.descriptor.metricKind, checkpoint.aggregatorKind)}`;

let results = '';
name = enforcePrometheusNamingConvention(name, record.descriptor.metricKind);
switch (record.aggregator.kind) {

@@ -137,0 +155,0 @@ case metrics_1.AggregatorKind.SUM:

10

package.json
{
"name": "@opentelemetry/exporter-prometheus",
"version": "0.19.1-alpha.37+a0385c45",
"version": "0.19.1-alpha.38+7775c0e2",
"description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus",

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

"dependencies": {
"@opentelemetry/api-metrics": "^0.19.1-alpha.37+a0385c45",
"@opentelemetry/core": "^0.19.1-alpha.37+a0385c45",
"@opentelemetry/metrics": "^0.19.1-alpha.37+a0385c45"
"@opentelemetry/api-metrics": "^0.19.0",
"@opentelemetry/core": "^0.19.0",
"@opentelemetry/metrics": "^0.19.0"
},
"gitHead": "a0385c45376a86d396cb364feda2b4afebd836d1"
"gitHead": "7775c0e2ffc5a4597e8aa401a18f1bae4d644780"
}

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