Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@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)
The npm package @opentelemetry/otlp-grpc-exporter-base receives a total of 2,093,275 weekly downloads. As such, @opentelemetry/otlp-grpc-exporter-base popularity was classified as popular.
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.