Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opentelemetry/exporter-metrics-otlp-grpc

Package Overview
Dependencies
Maintainers
3
Versions
42
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.55.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
541K
increased by17.66%
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

FAQs

Package last updated on 18 Nov 2024

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