-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
New component: GitHub Actions Logs Receiver #32505
Comments
Nice! As a heads up, @Elfo404 has added log support to the GitHub Actions Receiver, without the need for a new component to be created here https://github.com/grafana/opentelemetry-collector-contrib/tree/feat-add-githubactionseventreceiver. Worth collaborating perhaps. Just going through the PR process with the GHA Receiver component. |
Thanks for the heads up @krzko |
Oh, nice! Good to know that this already exists. Thank you for sharing this @krzko @Elfo404 A single receiver makes sense. I briefly looked at the code, and both our implementations look very similar, superficially looking at it. In our case, we had to handle an edge case involving a workflow with a large number of logs. Nevertheless, adding a batching mechanism (configurable) where logs are consumed in batches helped us keep memory usage low — under 1GB for the same workflow! Also, we had to handle cases where the job and step name in the entity object would differ from the folder or file names in the zip. I'd be happy to contribute and collaborate with you when the main PR is merged! |
Thanks for the proposal! From a quick read through I agree that this would make the most sense to be added as a part of the proposed (and accepted) GitHub actions receiver. 👍 |
edit: I misread the first portion and realized the functionality needed here is the downloading of the pipeline logs and not the Events themselves. My bad. |
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 |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Pinging code owners for receiver/github: @adrielp @andrzej-stencel @crobert-1 @TylerHelmuth. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
The purpose and use-cases of the new component
Our primary use case is to collect logs from multiple GitHub repositories in our organization and store them in a single place.
The GitHub Actions Log Receiver would receive
workflow_run
GitHub events through a webhook.When a workflow is
completed
, it downloads the log files and converts them to logs that can be consumed by the logs consumer.Downloading logs requires the permission
actions: read
; hence, you can provide GitHub PAT or GitHub App credentials. The token or app needs the appropriate permissions for any webhook event it receives.Also, you can validate the incoming payload using a webhook secret.
Hence, to allow the collector to receive webhook events, you can specify the webhook endpoint in a GitHub App or in a repository webhook.
Example configuration for the component
Telemetry data types supported
logs
Is this a vendor-specific component?
Code Owner(s)
No response
Sponsor (optional)
No response
Additional context
We are aware of and even highly inspired by the existing contribution in #27460, but we decided to create our own receiver.
However, if desired, I am willing to dismiss this proposal and contribute to the existing PR. cc @krzko
We have a working implementation in https://github.com/reakaleek/opentelemetry-collector-contrib/tree/feature/githubactionslogsreceiver/receiver/githubactionslogreceiver and are using it to store logs in elasticsearch.
Because we were aware of the existing receiver, we copied the functions to generate trace and span IDs, as well as service names, to be able to correlate traces with logs.
The text was updated successfully, but these errors were encountered: