Skip to content
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
navigation_title: Enable debug logging
description: Learn how to enable debug logging for the EDOT Collector in supported environments.
applies_to:
stack:
serverless:
observability:
product:
edot_collector: ga
products:
- id: cloud-serverless
- id: observability
- id: edot-collector
---

# Enable debug logging

You can enable debug-level logging in the Elastic Distributions of OpenTelemetry (EDOT) Collector by either modifying the configuration file or passing a runtime override. This is useful when troubleshooting startup issues or configuration problems.

This guide shows how to enable debug logging in different environments.

## Standalone EDOT Collector

If you're running the EDOT Collector directly, you can choose between two approaches:

* [Configuration file](#configuration-file) - to persist debug logging across restarts
* [Temporary override: runtime flag](#temporary-override-runtime-flag) - for temporary debugging or quick tests

Both approaches increase log verbosity and help surface misconfigurations.

### Configuration file

Add the following section to your EDOT Collector configuration file (typically `otel-collector-config.yaml`):

```yaml
service:
telemetry:
logs:
level: debug
```

This method works across all deployment environments.

### Temporary override: runtime flag

Pass the log level as a runtime argument using the `--set` flag:

```bash
otelcol --set=service.telemetry.logs.level=debug
```

This applies debug-level logging without modifying your configuration file.

## Kubernetes (Helm deployment)

If you're deploying the EDOT Collector using the Elastic Helm charts, enable debug logging by adding the configuration directly in your values.yaml file:

```yaml
config:
service:
telemetry:
logs:
level: debug
```

Alternatively, use a CLI override when installing or upgrading the Helm release:

```bash
helm upgrade --install my-collector/otel-collector \
--set config.service.telemetry.logs.level=debug
```

This ensures the Collector logs at debug level when deployed into your cluster.

## Other environments

Standalone and Kubernetes are currently the only officially supported deployment environments for the EDOT Collector.

However, if you're running the Collector in a different context, such as a manually containerized setup, you can still enable debug logging using the same methods:

* Add it to your configuration file using the `service.telemetry.logs.level` setting

* Pass it at runtime with `--set=service.telemetry.logs.level=debug`

:::{{note}}
Debug logging for the Collector is not currently configurable through {{fleet}}.
:::


1 change: 1 addition & 0 deletions troubleshoot/ingest/opentelemetry/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ toc:
children:
- file: edot-collector/collector-oomkilled.md
- file: edot-collector/metadata.md
- file: edot-collector/enable-debug-logging.md
- file: edot-collector/collector-not-starting.md
- file: edot-sdks/index.md
children:
Expand Down
Loading