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

Investigate possible log reduction in Signed API and Airnode feed #208

Closed
Siegrift opened this issue Jan 31, 2024 · 4 comments
Closed

Investigate possible log reduction in Signed API and Airnode feed #208

Siegrift opened this issue Jan 31, 2024 · 4 comments
Assignees

Comments

@Siegrift
Copy link
Collaborator

Relates to https://github.com/api3dao/tasks/issues/695

We've noticed that we are sending too much logs which is costly. The Signed APIs have been redeployed with level INFO to reduce the costs, but pretty much all of the INFO logs come from the server when the request is received (which is arguably still too often for INFO level). Better information would be to:

  • log some stats periodically (e.g. how many requests have been received throughout some period).
  • log out debug level information (request body, headers) when there is some validation error.

Similar analysis can be done for Airnode feed, which should be even more reasonable with log usage because its deployed by API providers.

@bbenligiray
Copy link
Member

I agree that individual "request sent"/"request received" INFO logs are redundant (so these may be downgraded to DEBUG)

@Siegrift
Copy link
Collaborator Author

Siegrift commented Feb 1, 2024

I mentioned on a call, that there is some advantage of these, for example to verify caching. That said, it would be possible even if we log a stats message.

@Siegrift
Copy link
Collaborator Author

Siegrift commented Feb 2, 2024

I agree that individual "request sent"/"request received" INFO logs are redundant (so these may be downgraded to DEBUG)

I mentioned on a call, that there is some advantage of these, for example to verify caching. That said, it would be possible even if we log a stats message.

I also used these logs heavily for #211 (comment) to debug the Signed API 502 response. After doing that, I think these logs are important.

After redeploying the Signed APIs with INFO level, they produce only ~2 GB per 24 hours which has negligible costs per month (30$). As a note, the "Received request ..." is the only log message from Signed API.

I did a similar drill down for Airnode feeds and for INFO level there are these logs:

Based on the above, we can expect similar logging costs to the Signed APIs. So I'd keep this as is.

@Siegrift
Copy link
Collaborator Author

Siegrift commented Feb 7, 2024

Agreed to keep things as is. In the future we may log much more because of #222

@Siegrift Siegrift closed this as completed Feb 7, 2024
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

No branches or pull requests

2 participants