Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@opentelemetry/exporter-logs-otlp-proto

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-logs-otlp-proto

An OTLP exporter to send logs using protobuf over HTTP

Source
npmnpm
Version
0.200.0
Version published
Weekly downloads
3.3M
-6.18%
Maintainers
3
Weekly downloads
 
Created

What is @opentelemetry/exporter-logs-otlp-proto?

@opentelemetry/exporter-logs-otlp-proto is an npm package that allows you to export logs using the OpenTelemetry Protocol (OTLP) in 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-logs-otlp-proto's main functionalities?

Exporting Logs

This feature allows you to export logs to an OTLP endpoint using the protobuf format. The code sample demonstrates how to set up the OTLPProtoLogExporter, create a LoggerProvider, and emit a log message.

const { OTLPProtoLogExporter } = require('@opentelemetry/exporter-logs-otlp-proto');
const { LoggerProvider } = require('@opentelemetry/sdk-logs');
const { SimpleLogRecordProcessor } = require('@opentelemetry/sdk-logs');

const exporter = new OTLPProtoLogExporter({
  url: 'http://localhost:4317',
});

const loggerProvider = new LoggerProvider();
loggerProvider.addLogRecordProcessor(new SimpleLogRecordProcessor(exporter));

const logger = loggerProvider.getLogger('example-logger');

logger.emit({
  severityText: 'INFO',
  body: 'This is an example log message',
});

Other packages similar to @opentelemetry/exporter-logs-otlp-proto

Keywords

opentelemetry

FAQs

Package last updated on 17 Mar 2025

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