@opentelemetry/exporter-prometheus
Advanced tools
Comparing version 0.24.1-alpha.31 to 0.25.1-alpha.21
/// <reference types="node" /> | ||
import { ExportResult } from '@opentelemetry/core'; | ||
import { MetricExporter, MetricRecord } from '@opentelemetry/metrics'; | ||
import { MetricExporter, MetricRecord } from '@opentelemetry/sdk-metrics-base'; | ||
import { IncomingMessage, ServerResponse } from 'http'; | ||
@@ -5,0 +5,0 @@ import { ExporterConfig } from './export/types'; |
@@ -1,2 +0,2 @@ | ||
import { MetricRecord } from '@opentelemetry/metrics'; | ||
import { MetricRecord } from '@opentelemetry/sdk-metrics-base'; | ||
import { PrometheusCheckpoint } from './types'; | ||
@@ -3,0 +3,0 @@ export declare class PrometheusLabelsBatcher { |
@@ -1,2 +0,2 @@ | ||
import { MetricRecord } from '@opentelemetry/metrics'; | ||
import { MetricRecord } from '@opentelemetry/sdk-metrics-base'; | ||
import { PrometheusCheckpoint } from './types'; | ||
@@ -3,0 +3,0 @@ export declare class PrometheusSerializer { |
@@ -19,3 +19,3 @@ "use strict"; | ||
*/ | ||
const metrics_1 = require("@opentelemetry/metrics"); | ||
const sdk_metrics_base_1 = require("@opentelemetry/sdk-metrics-base"); | ||
const core_1 = require("@opentelemetry/core"); | ||
@@ -64,3 +64,3 @@ function escapeString(str) { | ||
// Prometheus requires that metrics of the Counter kind have "_total" suffix | ||
if (!name.endsWith('_total') && kind === metrics_1.MetricKind.COUNTER) { | ||
if (!name.endsWith('_total') && kind === sdk_metrics_base_1.MetricKind.COUNTER) { | ||
name = name + '_total'; | ||
@@ -88,5 +88,5 @@ } | ||
switch (aggregatorKind) { | ||
case metrics_1.AggregatorKind.SUM: | ||
if (metricKind === metrics_1.MetricKind.COUNTER || | ||
metricKind === metrics_1.MetricKind.SUM_OBSERVER) { | ||
case sdk_metrics_base_1.AggregatorKind.SUM: | ||
if (metricKind === sdk_metrics_base_1.MetricKind.COUNTER || | ||
metricKind === sdk_metrics_base_1.MetricKind.SUM_OBSERVER) { | ||
return 'counter'; | ||
@@ -96,5 +96,5 @@ } | ||
return 'gauge'; | ||
case metrics_1.AggregatorKind.LAST_VALUE: | ||
case sdk_metrics_base_1.AggregatorKind.LAST_VALUE: | ||
return 'gauge'; | ||
case metrics_1.AggregatorKind.HISTOGRAM: | ||
case sdk_metrics_base_1.AggregatorKind.HISTOGRAM: | ||
return 'histogram'; | ||
@@ -156,4 +156,4 @@ default: | ||
switch (record.aggregator.kind) { | ||
case metrics_1.AggregatorKind.SUM: | ||
case metrics_1.AggregatorKind.LAST_VALUE: { | ||
case sdk_metrics_base_1.AggregatorKind.SUM: | ||
case sdk_metrics_base_1.AggregatorKind.LAST_VALUE: { | ||
const { value, timestamp: hrtime } = record.aggregator.toPoint(); | ||
@@ -164,3 +164,3 @@ const timestamp = core_1.hrTimeToMilliseconds(hrtime); | ||
} | ||
case metrics_1.AggregatorKind.HISTOGRAM: { | ||
case sdk_metrics_base_1.AggregatorKind.HISTOGRAM: { | ||
const { value, timestamp: hrtime } = record.aggregator.toPoint(); | ||
@@ -167,0 +167,0 @@ const timestamp = core_1.hrTimeToMilliseconds(hrtime); |
@@ -1,2 +0,2 @@ | ||
import { MetricDescriptor, AggregatorKind, MetricRecord } from '@opentelemetry/metrics'; | ||
import { MetricDescriptor, AggregatorKind, MetricRecord } from '@opentelemetry/sdk-metrics-base'; | ||
export interface PrometheusCheckpoint { | ||
@@ -3,0 +3,0 @@ descriptor: MetricDescriptor; |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.24.0"; | ||
export declare const VERSION = "0.25.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.24.0'; | ||
exports.VERSION = '0.25.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/exporter-prometheus", | ||
"version": "0.24.1-alpha.31+fd2410cc", | ||
"version": "0.25.1-alpha.21+0ef1fc28", | ||
"description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus", | ||
@@ -42,5 +42,5 @@ "main": "build/src/index.js", | ||
"devDependencies": { | ||
"@opentelemetry/api": "^1.0.1", | ||
"@opentelemetry/api": "^1.0.2", | ||
"@types/mocha": "8.2.3", | ||
"@types/node": "14.17.5", | ||
"@types/node": "14.17.9", | ||
"@types/sinon": "10.0.2", | ||
@@ -56,10 +56,10 @@ "codecov": "3.8.3", | ||
"peerDependencies": { | ||
"@opentelemetry/api": "^1.0.1" | ||
"@opentelemetry/api": "^1.0.2" | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/api-metrics": "^0.24.1-alpha.31+fd2410cc", | ||
"@opentelemetry/core": "^0.24.1-alpha.31+fd2410cc", | ||
"@opentelemetry/metrics": "^0.24.1-alpha.31+fd2410cc" | ||
"@opentelemetry/api-metrics": "^0.25.1-alpha.21+0ef1fc28", | ||
"@opentelemetry/core": "^0.25.1-alpha.21+0ef1fc28", | ||
"@opentelemetry/sdk-metrics-base": "^0.25.1-alpha.21+0ef1fc28" | ||
}, | ||
"gitHead": "fd2410cc9e8d43210b6ea44b8193fa70ee900499" | ||
"gitHead": "0ef1fc28d366b74d98b73b5d6334ffdc75342fe2" | ||
} |
@@ -8,3 +8,3 @@ # OpenTelemetry Prometheus Metric Exporter | ||
The OpenTelemetry Prometheus Metrics Exporter allows the user to send collected [OpenTelemetry Metrics](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-metrics) to Prometheus. | ||
The OpenTelemetry Prometheus Metrics Exporter allows the user to send collected [OpenTelemetry Metrics](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-metrics-base) to Prometheus. | ||
@@ -16,3 +16,3 @@ [Prometheus](https://prometheus.io/) is a monitoring system that collects metrics, by scraping exposed endpoints at regular intervals, evaluating rule expressions. It can also trigger alerts if certain conditions are met. For assistance setting up Prometheus, [Click here](https://opencensus.io/codelabs/prometheus/#0) for a guided codelab. | ||
```bash | ||
npm install --save @opentelemetry/metrics | ||
npm install --save @opentelemetry/sdk-metrics-base | ||
npm install --save @opentelemetry/exporter-prometheus | ||
@@ -27,3 +27,3 @@ ``` | ||
const { PrometheusExporter } = require('@opentelemetry/exporter-prometheus'); | ||
const { MeterProvider } = require('@opentelemetry/metrics'); | ||
const { MeterProvider } = require('@opentelemetry/sdk-metrics-base'); | ||
@@ -30,0 +30,0 @@ // Add your port and startServer to the Prometheus options |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
52732
+ Added@opentelemetry/sdk-metrics-base@^0.25.1-alpha.21+0ef1fc28
+ Added@opentelemetry/api-metrics@0.25.00.25.1-alpha.21(transitive)
+ Added@opentelemetry/core@0.25.1-alpha.23(transitive)
+ Added@opentelemetry/resources@0.25.1-alpha.23(transitive)
+ Added@opentelemetry/sdk-metrics-base@0.25.1-alpha.23(transitive)
+ Added@opentelemetry/semantic-conventions@0.25.0(transitive)
- Removed@opentelemetry/api-metrics@0.24.1-alpha.31(transitive)
- Removed@opentelemetry/core@0.24.1-alpha.31(transitive)
- Removed@opentelemetry/metrics@0.24.1-alpha.31(transitive)
- Removed@opentelemetry/resources@0.24.1-alpha.31(transitive)
- Removed@opentelemetry/semantic-conventions@0.24.1-alpha.31(transitive)