OpenTelemetry logs

This guide explains how to export Aidbox logs in OpenTelemetry format

Aidbox supports exporting logs using the Protobuf protocol in line with the OTEL specification. This guide configures Aidbox to export logs to the OpenTelemetry collector, but the setup can also be modified to export to other logs consumers that adhere to this specification.

This way of enabling OTEL capabilities is available in Aidbox versions 2503 and later. On previous AIdbox versions it was possible to enable OTEL with Aidbox configuration project.

Prerequisites

  1. OTEL collector should be deployed and configured to receive logs.

How to enable logs export to the OTEL collector

To enable exporting logs to the OTEL collector set the OTEL collector logs receiver endpoint to the Aidbox setting observability.otel.logs-url

How to check the OTEL collector receives logs

Set up debug exporter and logs pipeline in the OTEL collector configuration:

receivers:
receivers:
  otlp:
    protocols:
      http:
        endpoint: <your-collector-resiever-endpoint>

exporters:
  debug:
    verbosity: detailed

service:
  pipelines:
    logs:
      receivers: [otlp]
      exporters: [debug] # OTEL prints logs to the stdout

See Aidbox logs in the OTEL collector stdout

Open OTEL collector stdout and see the logs.

Check logs sending status

The common endpoint for checking status of sending metrics process

GET /telemetry/main/otel-logs-appender/$status

queue-size: 10
history:
- ts: 1700661071
  processed-count: 34

Force flush OTEL logs

To force flush all the logs Aidbox has in the queue use $flush endpoint:

POST /telemetry/main/otel-logs-appender/$flush

Check all available Aidbox OTEL logs exporter configuration options are here:

Last updated

Was this helpful?