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

refactor: add rpc logs flag #1182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const {
VERCEL_ENV,
GAS_MARKUP,
DISABLE_DEBUG_LOGS,
ENABLE_RPC_LOGS,
} = process.env;

const GOOGLE_SERVICE_ACCOUNT = _GOOGLE_SERVICE_ACCOUNT
Expand Down Expand Up @@ -746,7 +747,7 @@ function getProviderFromConfigJson(_chainId: string) {
500, // delay
5, // max. concurrency
"QUOTES_API", // cache namespace
0 // disable RPC calls logging
ENABLE_RPC_LOGS === "true" ? 100 : 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth making this env var a number of range [0, 100]? Toggling to 100 might be like trying to drink from the firehose in a situation where other things might already be going wrong, and it might have an undesirable performance impact. In the bots we run w/ 1% or something like that, but it's nice to be able to tune it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 - this makes to include a way to configure the logging in a more granular way

);
}

Expand Down
Loading