> ## Documentation Index
> Fetch the complete documentation index at: https://docs.honeyhive.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Log Export

> Send self-hosted HoneyHive service logs to your OpenTelemetry Collector over OTLP, with trace and span IDs for log-to-trace correlation.

HoneyHive services always write structured JSON logs to stdout. You can also send a copy of
each log record to your OpenTelemetry Collector over OTLP. Records written during a traced
request carry its trace and span IDs, so your backend can link logs to traces.

OTLP log export is off by default. If you don't turn it on, nothing changes.

Log export needs HoneyHive platform v1.18.0 or later: `hive-control-plane` chart v1.12.0 or
later and `hive-data-plane` chart v1.13.1 or later.

## Turn on log export

In the `values.yaml` for each chart (control plane and data plane), set:

```yaml theme={null}
common:
  observability:
    otel:
      enabled: true
      logsExporter: "otlp"
```

Then `helm upgrade` as usual. `logsExporter` sets `OTEL_LOGS_EXPORTER` on each supported
service. Logs go over gRPC to the same `common.observability.otel.collectorEndpoint` as traces
and metrics, so keep the endpoint you already use. The collector at that endpoint needs a
`logs` pipeline that includes its OTLP receiver. A collector set up only for traces and metrics
rejects log exports, and the services drop those records.

To turn export off again, set `logsExporter: "none"` (the default).

## Supported services

| Service | Exports logs |
| - | - |
| `cp-backend-service` | Yes |
| `cp-notification-service` | Yes |
| `cp-writer-service` | Yes |
| `dp-backend-service` | Yes |
| `dp-controller-service` | Yes |
| `dp-evaluation-service` | Yes |
| `dp-ingestion-service` | Yes |
| `dp-llmproxy-service` | Yes |
| `dp-pythonmetric-service` | Yes |
| `cp-controller-service` | No |
| `cp-frontend-service` | No |

The services marked "No" write to stdout only.

## Before you turn it on

* **Volume.** With export on, each log line written after startup also goes to your collector,
  at the same log level as stdout. Check that your collector and backend can take that volume.
* **Duplicates.** If you also collect pod stdout (for example, with a node log agent), your
  backend receives each line twice. Drop one of the two sources for HoneyHive pods.
* **Best effort.** Each service buffers records before export. If the buffer fills, for
  example during an ingestion spike, the service drops records from export. Stdout always
  keeps every record.
* **Record format.** Exported records use the OpenTelemetry log data model, not the stdout
  JSON layout. Log fields are record attributes, and the service name and environment are
  resource attributes (`service.name`, `deployment.environment`). Write your log queries
  against the exported form.
* **Crash logs.** If a service exits on a fatal error, records still in the export buffer
  are lost, so the last records before the exit (including the fatal one) can appear on
  stdout only.


## Related topics

- [Application Metrics](https://docs.honeyhive.ai/v2/setup/self-hosted/metrics.md)
- [Operations Guide](https://docs.honeyhive.ai/v2/setup/self-hosted/operations.md)
- [Troubleshooting & FAQs](https://docs.honeyhive.ai/v2/introduction/troubleshooting.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.