Skip to content

Create Telemetry client only once - #4992

Merged
agourlay merged 1 commit into
devfrom
create-telemetry-client-only-once
Aug 30, 2024
Merged

agourlay merged 1 commit into
devfrom
create-telemetry-client-only-once

Conversation

@agourlay

@agourlay agourlay commented Aug 30, 2024 •

Copy link
Copy Markdown
Member

Creating a Reqwest client is a rather expensive operation as it involves setting up a connection pool, configuring DNS resolver and setting up TLS things.

This PR proposes to create a single client for the telemetry reporter which is reused enabling to leverage connection pooling if possible.

Even if our reporting interval is high, it does not mean we should be wasteful with resources 🌎

@agourlay
agourlay requested review from generall and timvisee August 30, 2024 14:32

@timvisee timvisee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🙆‍♂️

@agourlay
agourlay merged commit bb7bc17 into dev Aug 30, 2024
@agourlay
agourlay deleted the create-telemetry-client-only-once branch August 30, 2024 14:52
timvisee pushed a commit that referenced this pull request Sep 17, 2024
@timvisee timvisee mentioned this pull request Sep 17, 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

Successfully merging this pull request may close these issues.

2 participants