
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@opentelemetry/otlp-grpc-exporter-base
Advanced tools
OpenTelemetry OTLP-gRPC Exporter base (for internal use only)
@opentelemetry/otlp-grpc-exporter-base is a base package for OpenTelemetry that provides functionality to export telemetry data (traces and metrics) using the gRPC protocol. It is designed to be extended by other packages to provide specific implementations for different telemetry data types.
Exporting Traces
This code demonstrates how to set up a trace exporter using the OTLP gRPC protocol. It initializes a NodeTracerProvider, sets up an OTLPTraceExporter with a specified URL, and registers a SimpleSpanProcessor to handle the spans.
const { OTLPTraceExporter } = require('@opentelemetry/otlp-grpc-exporter-base');
const { NodeTracerProvider } = require('@opentelemetry/node');
const { SimpleSpanProcessor } = require('@opentelemetry/tracing');
const provider = new NodeTracerProvider();
const exporter = new OTLPTraceExporter({
url: 'http://localhost:4317',
});
provider.addSpanProcessor(new SimpleSpanProcessor(exporter));
provider.register();
const tracer = provider.getTracer('example-tracer');
const span = tracer.startSpan('example-span');
span.end();
Exporting Metrics
This code demonstrates how to set up a metric exporter using the OTLP gRPC protocol. It initializes a MeterProvider, sets up an OTLPMetricExporter with a specified URL, and creates a counter metric to be exported.
const { OTLPMetricExporter } = require('@opentelemetry/otlp-grpc-exporter-base');
const { MeterProvider } = require('@opentelemetry/metrics');
const meterProvider = new MeterProvider();
const exporter = new OTLPMetricExporter({
url: 'http://localhost:4317',
});
meterProvider.addMetricReader(exporter);
const meter = meterProvider.getMeter('example-meter');
const counter = meter.createCounter('example_counter');
counter.add(10, { key: 'value' });
This package provides an exporter for sending telemetry data to the OpenTelemetry Collector using the gRPC protocol. It is similar to @opentelemetry/otlp-grpc-exporter-base but is more specific to the OpenTelemetry Collector.
This package provides an exporter for sending trace data to Zipkin. While it also deals with exporting telemetry data, it uses the Zipkin format and HTTP protocol instead of OTLP and gRPC.
This package provides an exporter for exposing metrics in a format that can be scraped by Prometheus. It is focused on metrics and uses the Prometheus exposition format, differing from the gRPC-based OTLP exporter.
Note: This package is intended for internal use only.
Note: This is an experimental package under active development. New releases may include breaking changes.
This module provides a gRPC exporter base for Node.js (browsers not supported) to be used with opentelemetry-collector.
npm install --save @opentelemetry/otlp-grpc-exporter-base
Apache 2.0 - See LICENSE for more information.
FAQs
OpenTelemetry OTLP-gRPC Exporter base (for internal use only)
We found that @opentelemetry/otlp-grpc-exporter-base demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.