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: migrate EventCache.canRecord to SessionManager.shouldSample #504

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

Conversation

williazz
Copy link
Contributor

@williazz williazz commented Feb 8, 2024

Purpose

Makes the session event counting logic more extensible for #505

Problem

SessionManager should decide if the sessionEventCount is under the sessionEventLimit, not EventCache. This PR gives that responsibility to SessionManager by removing EventCache.canRecord and implementing SessionManager.shouldSample, making it extensible to check for sessionEventLimitOverride(s) (#480).


Engineering plan for #480 summarized here #480 (comment)


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@williazz williazz requested a review from qhanam February 8, 2024 18:56
@williazz williazz changed the title chore: consolidate sampling logic in SessionManager chore: move EventCache.canRecord to SessionManager.shouldSample Feb 22, 2024
@williazz williazz changed the title chore: move EventCache.canRecord to SessionManager.shouldSample chore: migrate EventCache.canRecord to SessionManager.shouldSample Feb 22, 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.

1 participant