-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[receiver/awscloudwatch] Cannot scrape full named loggroups #32345
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Removing |
**Description:** Allow receiving named loggroups without stream filtering as indicated by a given example linked in the README **Link to tracking Issue:** #32345 **Testing:** Adds additional unit test for this specific config case. **Documentation:** None, implementation matches the given docs/example which was not the case before
…-telemetry#32346) **Description:** Allow receiving named loggroups without stream filtering as indicated by a given example linked in the README **Link to tracking Issue:** open-telemetry#32345 **Testing:** Adds additional unit test for this specific config case. **Documentation:** None, implementation matches the given docs/example which was not the case before
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Was this issue resolved by #32346? Is so, we can close it. |
Component(s)
receiver/awscloudwatch
What happened?
Description
In the receiver's docs, you have an example to scrape a loggroup by name without filtering for streams:
opentelemetry-collector-contrib/receiver/awscloudwatchreceiver/testdata/sample-configs/named-prefix.yaml
Lines 1 to 8 in 960844a
This example does not work, no data is scraped/exported.
I tried a workaround by setting an empty prefix, but according to the AWS SDK that is used here, this parameter needs at least 1 character.
From https://docs.aws.amazon.com/sdk-for-go/api/service/cloudwatchlogs/#FilterLogEventsInput
Steps to Reproduce
With an exporter and corresponding system of your choice (I use Loki & Grafana), configure the receiver with a named loggroup but without stream filtering (no name and no prefix). Then write data to the loggroup. Wait for the batch timeout if configured. Check the storage system for data.
Expected Result
The logs from all streams of the referenced loggroup are correctly scraped and exported to the storage system (Loki/Grafana in my case).
Actual Result
Data is not scraped/exported.
Collector version
v0.90.1
Environment information
Environment
AWS EKS 1.27
Nodes: x86_amd64, latest AWS-provided BottlerocketOS
OTel operator: Binary version v0.90.0, chart version 0.44.2, installed using the provided helm chart https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-operator
OTelCol: Binary v0.90.1, deployed by OTel-operator via OTelCol CRD
OpenTelemetry Collector configuration
Log output
No response
Additional context
I identified the problem here:
opentelemetry-collector-contrib/receiver/awscloudwatchreceiver/logs.go
Lines 104 to 113 in 960844a
A group config for named loggroups is only appended if it has a stream prefix or a name set. If none is present, nothing is appended, so the receiver does not know about the loggroup at all.
I implemented a fix and tested it in-cluster - works as expected. Please see the linked PR and confirm the approach or provide feedback. Thanks a lot for investing your time in this and the overall receiver! <3
The text was updated successfully, but these errors were encountered: