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.0 to 0.19.1-alpha.7

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:

12

package.json
{
"name": "@opentelemetry/exporter-prometheus",
"version": "0.19.0",
"version": "0.19.1-alpha.7+c4341c39",
"description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus",

@@ -44,3 +44,3 @@ "main": "build/src/index.js",

"@types/mocha": "8.2.2",
"@types/node": "14.14.37",
"@types/node": "14.14.41",
"@types/sinon": "9.0.11",

@@ -61,7 +61,7 @@ "codecov": "3.8.1",

"dependencies": {
"@opentelemetry/api-metrics": "0.19.0",
"@opentelemetry/core": "0.19.0",
"@opentelemetry/metrics": "0.19.0"
"@opentelemetry/api-metrics": "^0.19.0",
"@opentelemetry/core": "^0.19.1-alpha.7+c4341c39",
"@opentelemetry/metrics": "^0.19.1-alpha.7+c4341c39"
},
"gitHead": "0c15999dccd377294a03cf7d36085216d6e8c5c1"
"gitHead": "c4341c39dfcdaaa65a5d6ad8eb745b656d865177"
}

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