Skip to content
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

Turn received webhook event to Debug #395

Merged
merged 3 commits into from
Oct 23, 2024
Merged

Conversation

ahatzz11
Copy link
Contributor

@ahatzz11 ahatzz11 commented Oct 17, 2024

This is a possible resolution to #394. We're running a github app with this framework for 400+ repos, and the amount of logs we get for all of the webhook events we subscribe to is very noisy. When we get an event we do a bunch of filtering on things like event.GetAction() to only respond to events we care about. Allowing users to log on the messages that they want to process seems like a less noisy approach, with the option to turn on Trace logging and see every event that comes in.

Here's an example of some noisy event received logs before our own more tailored logs for the actions we care about:

12:53PM INF Received webhook event github_delivery_id=c5bf3530-8cb0-11ef-8e88-a7cddd8e0076 github_event_type=pull_request service=figure-validator
12:54PM INF Received webhook event github_delivery_id=cc155ea0-8cb0-11ef-848b-c9a3178cb0b2 github_event_type=pull_request service=figure-validator
12:54PM INF Received webhook event github_delivery_id=cbc19950-8cb0-11ef-8449-9a14a93e08b1 github_event_type=pull_request service=figure-validator
12:54PM INF pull_request event being handled: opened github_delivery_id=cbc19950-8cb0-11ef-8449-9a14a93e08b1 github_event_type=pull_request service=figure-validator

Fixes #394

@palantirtech
Copy link
Member

Thanks for your interest in palantir/go-githubapp, @ahatzz11! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@bluekeyes
Copy link
Member

Thanks, I agree this log message is probably less useful than we intended originally. If it works for you, I'd prefer to make this debug level instead of trace - we generally don't use trace level for anything, so debug is a bit more consistent with the rest of this library.

@ahatzz11 ahatzz11 changed the title Turn received webhook event to Trace Turn received webhook event to Debug Oct 22, 2024
@ahatzz11
Copy link
Contributor Author

Thanks, I agree this log message is probably less useful than we intended originally. If it works for you, I'd prefer to make this debug level instead of trace - we generally don't use trace level for anything, so debug is a bit more consistent with the rest of this library.

Sorry for the late response here - I have updated this to Debug

@bluekeyes bluekeyes merged commit e4ea459 into palantir:develop Oct 23, 2024
5 checks passed
@ahatzz11 ahatzz11 deleted the patch-1 branch October 23, 2024 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible to remove webhook received log?
3 participants