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

use a singleton http agent for queue events + Reduce metrics cardinality #391

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

fenos
Copy link
Contributor

@fenos fenos commented Oct 31, 2023

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

  • Everytime a queue message calls createStorage each storage client uses a different HTTP pool agent not taking advantage of keep-alive

  • All metrics requires the tenant_id label, which creates high cardinality metrics

What is the new behavior?

  • All events are now sharing a single HTTP agent pool
  • reduce metrics cardinality by removing the tenant_id label

@fenos fenos force-pushed the storage/singleton-s3-client-for-queues branch from 1c2c1d3 to cfd010e Compare October 31, 2023 09:31
@fenos fenos force-pushed the storage/singleton-s3-client-for-queues branch from cfd010e to 3325fd4 Compare November 1, 2023 14:31
@fenos fenos changed the title fix: use a singleton http agent for queue events use a singleton http agent for queue events + Reduce metrics cardinality Nov 1, 2023
@fenos fenos force-pushed the storage/singleton-s3-client-for-queues branch from 3325fd4 to 4d8861b Compare November 1, 2023 14:35
@coveralls
Copy link

coveralls commented Nov 1, 2023

Pull Request Test Coverage Report for Build 6721048154

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 79 of 80 (98.75%) changed or added relevant lines in 9 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 84.0%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/database/connection.ts 1 2 50.0%
Totals Coverage Status
Change from base Build 6618123878: 0.04%
Covered Lines: 7508
Relevant Lines: 8866

💛 - Coveralls

@fenos fenos merged commit 84c627e into master Nov 1, 2023
1 check passed
@fenos fenos deleted the storage/singleton-s3-client-for-queues branch November 1, 2023 16:11
Copy link

github-actions bot commented Nov 1, 2023

🎉 This PR is included in version 0.43.9 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants