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

chore: Log requests to widget endpoints #2250

Merged
merged 3 commits into from
Oct 17, 2024
Merged

Conversation

cmaddox5
Copy link
Contributor

We have no logs for these endpoints in any environment but Mercury uses them to create images for the e-inks. Adding some logging so we have a way to tell when something goes wrong.

@cmaddox5 cmaddox5 requested a review from a team as a code owner October 17, 2024 13:29
@digitalcora
Copy link
Contributor

It looks like the assertion that we had no logs for these endpoints was my mistake — we do, in the sense that they're covered by the standard Phoenix request logs, and I just missed them in my searching. So, I'm not sure if adding this extra logging is valuable, but open to the suggestion.

@cmaddox5
Copy link
Contributor Author

The existing logs may make the info log I added redundant, but I think having some visibility into bad requests would be helpful. I would be curious to see if an error indicates an issue on the screen so being notified of them could help answer that. What do you think?

@digitalcora
Copy link
Contributor

Error logging sounds good — this is kind of an "exceptional" scenario rather than something we'd expect to hit regularly. If we want to be notified proactively about it, maybe a Sentry report instead? But I think just making it stand out a bit more in the logs is fine.

@cmaddox5 cmaddox5 merged commit 03696d4 into main Oct 17, 2024
11 checks passed
@cmaddox5 cmaddox5 deleted the cm/widget-endpoint-logs branch October 17, 2024 18:14
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.

2 participants