Skip to content

Conversation

@mabdinur
Copy link
Contributor

What does this PR do?

Adds OpenTelemetry Logs API support to the datadog-opentelemetry crate, mirroring the existing metrics implementation.

Motivation

  • Provides a consistent API for logs export matching the metrics API (logs() mirrors metrics())
  • Enables OTLP-based logs export via gRPC and HTTP/protobuf protocols
  • Follows the same patterns and conventions as the metrics implementation for maintainability

Additional Notes

  • New feature flags: logs-grpc and logs-http (mirroring metrics-grpc and metrics-http)
  • Configuration via standard OpenTelemetry environment variables (DD_LOGS_OTEL_ENABLED, OTEL_EXPORTER_OTLP_LOGS_*)
  • Returns no-op logger provider on errors to prevent application crashes
  • Note: OpenTelemetry 0.31.0 doesn't have a global logger provider setter, so users must manage the logger provider instance

@mabdinur mabdinur force-pushed the munir/otel-logs-vibez branch 2 times, most recently from b21a1dd to 71b28b3 Compare January 28, 2026 20:39
@mabdinur mabdinur force-pushed the munir/otel-logs-vibez branch from 71b28b3 to 88814b7 Compare January 30, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants