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.24.1-alpha.1 to 0.24.1-alpha.4

2

build/src/PrometheusExporter.d.ts
/// <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;

{
"name": "@opentelemetry/exporter-prometheus",
"version": "0.24.1-alpha.1+3b9cd16a",
"version": "0.24.1-alpha.4+a8d39317",
"description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus",

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

"dependencies": {
"@opentelemetry/api-metrics": "^0.24.1-alpha.1+3b9cd16a",
"@opentelemetry/core": "^0.24.1-alpha.1+3b9cd16a",
"@opentelemetry/metrics": "^0.24.1-alpha.1+3b9cd16a"
"@opentelemetry/api-metrics": "^0.24.1-alpha.4+a8d39317",
"@opentelemetry/core": "^0.24.1-alpha.4+a8d39317",
"@opentelemetry/sdk-metrics-base": "^0.24.1-alpha.4+a8d39317"
},
"gitHead": "3b9cd16a8eeed7a262bdfea4c93098861b4c1ba0"
"gitHead": "a8d39317b5daad727f2116ca314db0d1420ec488"
}

@@ -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

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