Socket
Socket
Sign inDemoInstall

@opentelemetry/exporter-metrics-otlp-proto

Package Overview
Dependencies
Maintainers
2
Versions
38
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


Version published
Weekly downloads
383K
increased by4.39%
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

FAQs

Package last updated on 24 Aug 2022

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

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