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: send one sample event / response per label set to reporting #5289

Closed
wants to merge 2 commits into from

Conversation

vamsikrishnakandi
Copy link
Contributor

Description

Send one sample event or response per LabelSet to reporting within the configured duration.

  • Generate a hash for each report and store it in memory.
  • If the hash is already present in the cache, do not resend the sample event or response. If the hash is not present, send the sample event/response.
  • The hash stored in the cache expires after the configured TTL.
  • Limit the number of keys stored in the cache. If the limit is exceeded, the hash will not be stored.

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.

@cisse21
Copy link
Member

cisse21 commented Nov 13, 2024

Let's store the samples in BadgerDB instead of memory? This can get pretty bloated up in multi-tenant environments like we have seen with live events. WDYT @Sidddddarth @lvrach ?

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 80.76923% with 15 lines in your changes missing coverage. Please review.

Project coverage is 73.20%. Comparing base (6abcedd) to head (25ec9cc).
Report is 15 commits behind head on master.

Files with missing lines Patch % Lines
enterprise/reporting/reporting.go 31.81% 13 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5289      +/-   ##
==========================================
- Coverage   73.27%   73.20%   -0.08%     
==========================================
  Files         424      426       +2     
  Lines       59960    60023      +63     
==========================================
+ Hits        43936    43939       +3     
- Misses      13559    13620      +61     
+ Partials     2465     2464       -1     

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

@vamsikrishnakandi
Copy link
Contributor Author

#5298

@vamsikrishnakandi vamsikrishnakandi deleted the feat.event-sampling branch November 14, 2024 10:10
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