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

do not frequently create and destroy http client threads #3198

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

xiehuc
Copy link

@xiehuc xiehuc commented Dec 10, 2024

Fixes #3189

Changes

keep the background thread for a while and destroy only when it's free for 1 minute.
Just like the background thread in OTLP file exporter.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@xiehuc xiehuc requested a review from a team as a code owner December 10, 2024 12:04
Copy link

linux-foundation-easycla bot commented Dec 10, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link

netlify bot commented Dec 10, 2024

Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
🔨 Latest commit 66356c5
🔍 Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/675accb661ec8a0008106bf0

@xiehuc xiehuc changed the title fix #3189, fix frequently create and destroy http client threads [EXT] fix frequently create and destroy http client threads Dec 10, 2024
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.83%. Comparing base (490f882) to head (66356c5).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3198   +/-   ##
=======================================
  Coverage   87.83%   87.83%           
=======================================
  Files         195      195           
  Lines        6154     6154           
=======================================
  Hits         5405     5405           
  Misses        749      749           

@owent owent changed the title [EXT] fix frequently create and destroy http client threads [WIP] Fix #3189, fix frequently create and destroy http client threads Dec 10, 2024
@xiehuc xiehuc changed the title [WIP] Fix #3189, fix frequently create and destroy http client threads [WIP] fix frequently create and destroy http client threads Dec 10, 2024
@xiehuc xiehuc changed the title [WIP] fix frequently create and destroy http client threads [WIP] not frequently create and destroy http client threads Dec 12, 2024
@xiehuc xiehuc changed the title [WIP] not frequently create and destroy http client threads [WIP] do not frequently create and destroy http client threads Dec 12, 2024
Copy link
Member

@owent owent left a comment

Choose a reason for hiding this comment

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

LGTM and thanks for your contribution.

@owent owent changed the title [WIP] do not frequently create and destroy http client threads do not frequently create and destroy http client threads Dec 12, 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.

[HTTP Client] Reduce the frequency of creating and destroying background threads in HTTP Client.
2 participants