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

feat: sampled RPC logging #1315

Merged
merged 8 commits into from
Mar 21, 2024
Merged

feat: sampled RPC logging #1315

merged 8 commits into from
Mar 21, 2024

Conversation

mrice32
Copy link
Contributor

@mrice32 mrice32 commented Mar 20, 2024

This PR adds a small change to sample RPC requests/responses to be sampled and logged by the provider (including latency). The sample rate is configurable s.t. an operator can produce more or fewer logs depending on their interest (or disable). The default is set to 0.1%.

My hope is that this will enable operators to pipe their logs to dashboarding tools to visualize RPC performance.

Open question: should the sample rate be set to 0 by default to keep things simple for the typical operator who may not care about these metrics?

Copy link
Member

@nicholaspai nicholaspai left a comment

Choose a reason for hiding this comment

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

I like defaulting to 0 and making this configurable via the env

Copy link
Contributor

@pxrl pxrl left a comment

Choose a reason for hiding this comment

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

Great idea!

src/utils/ProviderUtils.ts Outdated Show resolved Hide resolved
src/utils/ProviderUtils.ts Outdated Show resolved Hide resolved
mrice32 and others added 3 commits March 20, 2024 16:03
Signed-off-by: Matt Rice <[email protected]>
@mrice32
Copy link
Contributor Author

mrice32 commented Mar 21, 2024

I like defaulting to 0 and making this configurable via the env

Done

@mrice32 mrice32 merged commit 5706751 into master Mar 21, 2024
4 checks passed
@pxrl pxrl deleted the rpc_logging branch March 21, 2024 21:08
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.

3 participants