Skip to content

pkg/util/log: Add support for OTLP sink #143049

@arjunmahishi

Description

@arjunmahishi

Describe the solution you'd like
Implement an OTLP sink for CockroachDB logging that sends logs in OpenTelemetry format via gRPC (and optionally HTTP/JSON). It should expose configuration parameters (e.g., endpoint, port, auth headers) and integrate with the existing logging framework similar to HTTP and Fluent sinks.

OTLP leverages protocol buffers for efficient binary serialization, reducing payload sizes and enhancing performance compared to text-based formats. Its support for gRPC enables low-latency, high-throughput communication, while HTTP/JSON provides compatibility when needed.

Why we should do this

  • The SRE team is currently migrating Fluent Bit to OTel using the existing Fluent sink. Adding native OTLP support will optimise the logging pipeline further and help standardise the OpenTelemetry ecosystem.
  • Serverless log export (to customers) currently uses Fluent Bit as a log forwarder [ CRDB -> fluentbit -> otel-agent -> customer ]. Adding OTLP support would significantly simplify this pipeline.
  • Self hosted customers can also take advantage of this while setting up their logging pipeline.

References

Jira issue: CRDB-48633

Metadata

Metadata

Assignees

Labels

C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-observabilityv25.4.0-prerelease

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions