opentelemetry_logging 0.4.0 copy "opentelemetry_logging: ^0.4.0" to clipboard
opentelemetry_logging: ^0.4.0 copied to clipboard

A simple library implementing sending logs to OpenTelemetry, supports gRPC and HTTP protocols.

OpenTelemetry Logging Dart #

Pub Version Coverage OpenSSF Scorecard

A Dart package for logging with OpenTelemetry, supporting gRPC backends and seamless integration with observability platforms.

Features #

  • Simple logging
  • OpenTelemetry protocol support (gRPC and HTTP)

Getting Started #

Add the package to your pubspec.yaml:

dependencies:
  opentelemetry_logging_dart: ^latest

Import and use in your Dart code:

import 'package:opentelemetry_logging/opentelemetry_logging_dart.dart';

// Create logger
final logger = OpenTelemetryLogger(
  backend: OpenTelemetryHttpBackend(
      endpoint: Uri.parse('http://localhost:4318/v1/logs')),
  batchSize: 10,
  flushInterval: const Duration(seconds: 5),
  traceId: '1234567890abcdef1234567890abcdef',
);

// Use logger
logger.debug('Hello!');

Contributing #

Contributions are welcome! Please open issues or pull requests on GitHub.

License #

This project is licensed under the MIT License.

0
likes
150
points
1.89k
downloads

Publisher

verified publisherchimerapps.com

Weekly Downloads

A simple library implementing sending logs to OpenTelemetry, supports gRPC and HTTP protocols.

Repository (GitHub)

Topics

#logging #opentelemetry

Documentation

API reference

License

MIT (license)

Dependencies

fixnum, grpc, http, protobuf

More

Packages that depend on opentelemetry_logging