@opentelemetry/exporter-prometheus
Advanced tools
Comparing version 0.29.2 to 0.30.0
export * from './PrometheusExporter'; | ||
export * from './PrometheusSerializer'; | ||
export * from './export/types'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -29,3 +29,4 @@ "use strict"; | ||
__exportStar(require("./PrometheusExporter"), exports); | ||
__exportStar(require("./PrometheusSerializer"), exports); | ||
__exportStar(require("./export/types"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import { ResourceMetrics, InstrumentType, ScopeMetrics, MetricData, DataPoint, Histogram } from '@opentelemetry/sdk-metrics-base'; | ||
import { ResourceMetrics } from '@opentelemetry/sdk-metrics-base'; | ||
export declare class PrometheusSerializer { | ||
@@ -7,7 +7,7 @@ private _prefix; | ||
serialize(resourceMetrics: ResourceMetrics): string; | ||
serializeScopeMetrics(scopeMetrics: ScopeMetrics): string; | ||
serializeMetricData(metricData: MetricData): string; | ||
serializeSingularDataPoint(name: string, type: InstrumentType, dataPoint: DataPoint<number>): string; | ||
serializeHistogramDataPoint(name: string, type: InstrumentType, dataPoint: DataPoint<Histogram>): string; | ||
private _serializeScopeMetrics; | ||
private _serializeMetricData; | ||
private _serializeSingularDataPoint; | ||
private _serializeHistogramDataPoint; | ||
} | ||
//# sourceMappingURL=PrometheusSerializer.d.ts.map |
@@ -135,14 +135,14 @@ "use strict"; | ||
for (const scopeMetrics of resourceMetrics.scopeMetrics) { | ||
str += this.serializeScopeMetrics(scopeMetrics); | ||
str += this._serializeScopeMetrics(scopeMetrics); | ||
} | ||
return str; | ||
} | ||
serializeScopeMetrics(scopeMetrics) { | ||
_serializeScopeMetrics(scopeMetrics) { | ||
let str = ''; | ||
for (const metric of scopeMetrics.metrics) { | ||
str += this.serializeMetricData(metric) + '\n'; | ||
str += this._serializeMetricData(metric) + '\n'; | ||
} | ||
return str; | ||
} | ||
serializeMetricData(metricData) { | ||
_serializeMetricData(metricData) { | ||
let name = sanitizePrometheusMetricName(escapeString(metricData.descriptor.name)); | ||
@@ -160,3 +160,3 @@ if (this._prefix) { | ||
results = metricData.dataPoints | ||
.map(it => this.serializeSingularDataPoint(name, metricData.descriptor.type, it)) | ||
.map(it => this._serializeSingularDataPoint(name, metricData.descriptor.type, it)) | ||
.join(''); | ||
@@ -167,3 +167,3 @@ break; | ||
results = metricData.dataPoints | ||
.map(it => this.serializeHistogramDataPoint(name, metricData.descriptor.type, it)) | ||
.map(it => this._serializeHistogramDataPoint(name, metricData.descriptor.type, it)) | ||
.join(''); | ||
@@ -178,3 +178,3 @@ break; | ||
} | ||
serializeSingularDataPoint(name, type, dataPoint) { | ||
_serializeSingularDataPoint(name, type, dataPoint) { | ||
let results = ''; | ||
@@ -187,3 +187,3 @@ name = enforcePrometheusNamingConvention(name, type); | ||
} | ||
serializeHistogramDataPoint(name, type, dataPoint) { | ||
_serializeHistogramDataPoint(name, type, dataPoint) { | ||
let results = ''; | ||
@@ -190,0 +190,0 @@ name = enforcePrometheusNamingConvention(name, type); |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.29.2"; | ||
export declare const VERSION = "0.30.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.29.2'; | ||
exports.VERSION = '0.30.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/exporter-prometheus", | ||
"version": "0.29.2", | ||
"version": "0.30.0", | ||
"description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus", | ||
@@ -32,3 +32,3 @@ "main": "build/src/index.js", | ||
"engines": { | ||
"node": ">=8.12.0" | ||
"node": ">=14" | ||
}, | ||
@@ -63,7 +63,7 @@ "files": [ | ||
"dependencies": { | ||
"@opentelemetry/api-metrics": "0.29.2", | ||
"@opentelemetry/core": "1.3.1", | ||
"@opentelemetry/sdk-metrics-base": "0.29.2" | ||
"@opentelemetry/api-metrics": "0.30.0", | ||
"@opentelemetry/core": "1.4.0", | ||
"@opentelemetry/sdk-metrics-base": "0.30.0" | ||
}, | ||
"gitHead": "51afd54bd63e46d5d530266761144c7be2f6b3a7" | ||
"gitHead": "e39ab883b18636238ef0fd741df4ce5ed53e8d04" | ||
} |
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
577
67455
+ Added@opentelemetry/api-metrics@0.30.0(transitive)
+ Added@opentelemetry/core@1.4.0(transitive)
+ Added@opentelemetry/resources@1.4.0(transitive)
+ Added@opentelemetry/sdk-metrics-base@0.30.0(transitive)
+ Added@opentelemetry/semantic-conventions@1.4.0(transitive)
- Removed@opentelemetry/api-metrics@0.29.2(transitive)
- Removed@opentelemetry/core@1.3.1(transitive)
- Removed@opentelemetry/resources@1.3.1(transitive)
- Removed@opentelemetry/sdk-metrics-base@0.29.2(transitive)
- Removed@opentelemetry/semantic-conventions@1.3.1(transitive)
Updated@opentelemetry/core@1.4.0