-
Notifications
You must be signed in to change notification settings - Fork 159
Add new troubleshooting page: Enable debug logging (for EDOT Collector) #2230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c15132e
Add enable-debug-logging.md
alexandra5000 3549baf
Update troubleshoot/ingest/opentelemetry/edot-collector/enable-debug-…
theletterf 1d678a7
Merge branch 'main' into debug-logging
theletterf 9c6b1eb
Merge branch 'main' into debug-logging
theletterf 878b443
Change incorrect examples
alexandra5000 c955d39
Merge branch 'main' into debug-logging
alexandra5000 838d5ba
Merge remote-tracking branch 'upstream/main' into debug-logging
alexandra5000 97c3182
Apply comments
alexandra5000 92b2337
Merge branch 'main' into debug-logging
alexandra5000 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
89 changes: 89 additions & 0 deletions
89
troubleshoot/ingest/opentelemetry/edot-collector/enable-debug-logging.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
alexandra5000 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
```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 | ||
``` | ||
alexandra5000 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
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}}. | ||
::: | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.