Socket
Book a DemoInstallSign in
Socket

@opentelemetry/exporter-metrics-otlp-proto

Package Overview
Dependencies
Maintainers
2
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/exporter-metrics-otlp-proto

OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector using protobuf over HTTP

latest
Source
npmnpm
Version
0.205.0
Version published
Weekly downloads
3.6M
0.06%
Maintainers
2
Weekly downloads
 
Created

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

@opentelemetry/exporter-metrics-otlp-proto is an npm package that allows you to export metrics data from your application to the OpenTelemetry Collector using the OTLP (OpenTelemetry Protocol) over gRPC in a protobuf format. This package is part of the OpenTelemetry project, which provides a set of APIs, libraries, agents, and instrumentation to enable observability in your applications.

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

Exporting Metrics

This code sample demonstrates how to set up the OTLPMetricExporter to export metrics data to an OpenTelemetry Collector. It creates a MeterProvider with the exporter and an interval for exporting metrics. A counter metric is then created and incremented.

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

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

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

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

counter.add(10, { key: 'value' });

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

Keywords

opentelemetry

FAQs

Package last updated on 10 Sep 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