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

chore: send multiple reports in a single request to reporting #5264

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

Conversation

vamsikrishnakandi
Copy link
Contributor

@vamsikrishnakandi vamsikrishnakandi commented Nov 6, 2024

Description

Send multiple reports in a single request to reporting

  • Removed the keys (from report object) from the identifier to include multiple reports
  • For every new identifier we are adding payload for request to the values array
  • So when limit for reports count in a request is reached,
    • we are deleting the identifier, but this will be part of values array
    • new payload object will be created and added to values if new entry is found with same identifier
    • so if there are more reports with same identifier, they are split in to multiple request

Linear Ticket

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@@ -88,6 +89,7 @@ func NewDefaultReporter(ctx context.Context, log logger.Logger, configSubscriber
maxConcurrentRequests := config.GetReloadableIntVar(32, 1, "Reporting.maxConcurrentRequests")
maxOpenConnections := config.GetIntVar(32, 1, "Reporting.maxOpenConnections")
dbQueryTimeout = config.GetReloadableDurationVar(60, time.Second, "Reporting.dbQueryTimeout")
maxReportsCountInARequest := config.GetReloadableIntVar(1, 1, "Reporting.maxReportsCountInARequest")
Copy link
Contributor

Choose a reason for hiding this comment

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

lets keep 10 as default value?

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 73.19%. Comparing base (0b4d6b1) to head (22a89e8).

Files with missing lines Patch % Lines
app/apphandlers/processorAppHandler.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5264      +/-   ##
==========================================
- Coverage   73.20%   73.19%   -0.02%     
==========================================
  Files         424      424              
  Lines       59946    59949       +3     
==========================================
- Hits        43885    43879       -6     
- Misses      13602    13606       +4     
- Partials     2459     2464       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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