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
2
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.28.0 to 0.29.0

3

build/src/PrometheusExporter.d.ts
/// <reference types="node" />
import { MetricReader } from '@opentelemetry/sdk-metrics-base';
import { AggregationTemporality, MetricReader } from '@opentelemetry/sdk-metrics-base';
import { IncomingMessage, ServerResponse } from 'http';

@@ -27,2 +27,3 @@ import { ExporterConfig } from './export/types';

constructor(config?: ExporterConfig, callback?: () => void);
selectAggregationTemporality(): AggregationTemporality;
onForceFlush(): Promise<void>;

@@ -29,0 +30,0 @@ /**

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

constructor(config = {}, callback) {
super(sdk_metrics_base_1.AggregationTemporality.CUMULATIVE);
super();
/**

@@ -61,7 +61,8 @@ * Request handler used by http library to respond to incoming requests

this.collect()
.then(resourceMetrics => {
let result = NO_REGISTERED_METRICS;
if (resourceMetrics != null) {
result = this._serializer.serialize(resourceMetrics);
.then(collectionResult => {
const { resourceMetrics, errors } = collectionResult;
if (errors.length) {
api_1.diag.error('PrometheusExporter: metrics collection errors', ...errors);
}
let result = this._serializer.serialize(resourceMetrics);
if (result === '') {

@@ -109,2 +110,5 @@ result = NO_REGISTERED_METRICS;

}
selectAggregationTemporality() {
return sdk_metrics_base_1.AggregationTemporality.CUMULATIVE;
}
async onForceFlush() {

@@ -111,0 +115,0 @@ /** do nothing */

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

import { ResourceMetrics, InstrumentType, InstrumentationLibraryMetrics, MetricData, DataPoint, Histogram } from '@opentelemetry/sdk-metrics-base';
import { ResourceMetrics, InstrumentType, ScopeMetrics, MetricData, DataPoint, Histogram } from '@opentelemetry/sdk-metrics-base';
export declare class PrometheusSerializer {

@@ -7,3 +7,3 @@ private _prefix;

serialize(resourceMetrics: ResourceMetrics): string;
serializeInstrumentationLibraryMetrics(instrumentationLibraryMetrics: InstrumentationLibraryMetrics): string;
serializeScopeMetrics(scopeMetrics: ScopeMetrics): string;
serializeMetricData(metricData: MetricData): string;

@@ -10,0 +10,0 @@ serializeSingularDataPoint(name: string, type: InstrumentType, dataPoint: DataPoint<number>): string;

@@ -134,10 +134,10 @@ "use strict";

let str = '';
for (const instrumentationLibraryMetrics of resourceMetrics.instrumentationLibraryMetrics) {
str += this.serializeInstrumentationLibraryMetrics(instrumentationLibraryMetrics);
for (const scopeMetrics of resourceMetrics.scopeMetrics) {
str += this.serializeScopeMetrics(scopeMetrics);
}
return str;
}
serializeInstrumentationLibraryMetrics(instrumentationLibraryMetrics) {
serializeScopeMetrics(scopeMetrics) {
let str = '';
for (const metric of instrumentationLibraryMetrics.metrics) {
for (const metric of scopeMetrics.metrics) {
str += this.serializeMetricData(metric) + '\n';

@@ -144,0 +144,0 @@ }

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

export declare const VERSION = "0.28.0";
export declare const VERSION = "0.29.0";
//# sourceMappingURL=version.d.ts.map

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

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

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

"sinon": "12.0.1",
"ts-mocha": "8.0.0",
"ts-mocha": "9.0.2",
"typescript": "4.4.4"

@@ -63,7 +63,7 @@ },

"dependencies": {
"@opentelemetry/api-metrics": "0.28.0",
"@opentelemetry/core": "1.2.0",
"@opentelemetry/sdk-metrics-base": "0.28.0"
"@opentelemetry/api-metrics": "0.29.0",
"@opentelemetry/core": "1.3.0",
"@opentelemetry/sdk-metrics-base": "0.29.0"
},
"gitHead": "28a177ffe3950c5602a91391af582a7a8c813c7d"
"gitHead": "eda0b092db484855ded8b4837ba7fc19a377c5a7"
}

Sorry, the diff of this file is not supported yet

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