🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@opentelemetry/exporter-metrics-otlp-grpc

Package Overview
Dependencies
Maintainers
3
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/exporter-metrics-otlp-grpc

OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector

0.201.1
latest
Source
npm
Version published
Weekly downloads
1.6M
8.91%
Maintainers
3
Weekly downloads
 
Created

What is @opentelemetry/exporter-metrics-otlp-grpc?

@opentelemetry/exporter-metrics-otlp-grpc is an npm package that allows you to export metrics data using the OpenTelemetry Protocol (OTLP) over gRPC. This package is part of the OpenTelemetry project, which provides a set of APIs, libraries, agents, and instrumentation to enable observability for cloud-native software. The package is used to send collected metrics data to an OpenTelemetry Collector or other backend that supports OTLP over gRPC.

What are @opentelemetry/exporter-metrics-otlp-grpc's main functionalities?

Exporting Metrics

This code sample demonstrates how to set up the OTLP gRPC exporter to send metrics data to a specified endpoint. It creates a meter provider, sets up an exporter, and creates a counter metric that increments every second.

const { MeterProvider } = require('@opentelemetry/sdk-metrics-base');
const { OTLPMetricExporter } = require('@opentelemetry/exporter-metrics-otlp-grpc');

const exporter = new OTLPMetricExporter({
  url: 'grpc://localhost:4317',
});

const meterProvider = new MeterProvider({
  exporter,
  interval: 2000,
});

const meter = meterProvider.getMeter('example-meter');
const counter = meter.createCounter('example_counter');

setInterval(() => {
  counter.add(1, { key: 'value' });
}, 1000);

Other packages similar to @opentelemetry/exporter-metrics-otlp-grpc

Keywords

opentelemetry

FAQs

Package last updated on 19 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts