Socket
Socket
Sign inDemoInstall

@opentelemetry/exporter-trace-otlp-grpc

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/exporter-trace-otlp-grpc

OpenTelemetry Collector Exporter allows user to send collected traces to the OpenTelemetry Collector


Version published
Maintainers
3
Created

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

The @opentelemetry/exporter-trace-otlp-grpc npm package is used to export telemetry data, specifically traces, from an application to a backend that supports the OpenTelemetry Protocol (OTLP) over gRPC. This is part of the OpenTelemetry project, which provides a set of APIs, libraries, agents, and instrumentation to create and manage telemetry data (metrics, logs, and traces) for cloud-native software.

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

Exporting Traces

This code sample demonstrates how to set up the OpenTelemetry Node.js tracer provider with the OTLP gRPC Trace Exporter. It initializes the exporter and adds it to the provider as a span processor, which will batch and send the collected traces to the configured backend.

const { TraceExporter } = require('@opentelemetry/exporter-trace-otlp-grpc');
const { NodeTracerProvider } = require('@opentelemetry/node');
const { BatchSpanProcessor } = require('@opentelemetry/tracing');

// Initialize a tracer provider
const provider = new NodeTracerProvider();

// Initialize the OTLP gRPC Trace Exporter
const otlpExporter = new TraceExporter();

// Add the exporter to the provider
provider.addSpanProcessor(new BatchSpanProcessor(otlpExporter));

// Register the provider
provider.register();

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

Keywords

FAQs

Package last updated on 29 Feb 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