aws / aws/amazon-cloudwatch-agent

Feature Request: "debug" flag should surface Prometheus scraper errors

Open
#1,948 1 comment 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
550
Forks
271
Avg merge
1d 21h
Merged PRs (30d)
13

Description

I assumed the agent surfaces Prometheus scraper errors in the agent logs, especifically when the agent { debug: true } is set. Turns out it doesn't. Would of been a time-saver if it did.

EDIT: There is an undocumented `DEBUG` environment variable to enable Prometheus debug logging in the CloudWatch Agent:

https://github.com/aws/amazon-cloudwatch-agent/blob/71bdd66ac78de664621fce0b3e5c78c11cd15adb/plugins/inputs/prometheus/start.go#L82-L90

[EDIT: removed confused bugreport caused by warning while expecting other errors in the logs]

Contributor guide

Open the contributing guide

Research direction

Start with plugins/inputs/prometheus/start.go around lines 82-90 and trace how the DEBUG environment variable currently enables Prometheus logging. Compare that path with the agent's debug: true setting and identify the expected scraper-error output. Done means scraper errors appear in the agent logs when debug mode is enabled; verify the behavior with the relevant Prometheus input tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, prometheus
Domain
observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.