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

Add sampling logic #805

Merged
merged 21 commits into from
Jan 15, 2025
Merged

Add sampling logic #805

merged 21 commits into from
Jan 15, 2025

Conversation

quinnmil
Copy link
Contributor

@quinnmil quinnmil commented Jan 3, 2025

Changes

  • Adds Sampler class which handles:
  • Loading sampling configuration
  • Finding the matching job/controller pattern for a given operation name. Update: This has been simplified to just use a startswith to be consistent with how the current ignore_path logic works.
  • get sampling rate for matched job/controller, make sampling decision based on priority order.
  • Updates Config module to accept new configuration options: sample_endpoint_rate and sample_job_rate which work as a endpoint/job catchall, with the fallback value still being the global sample_rate.

@quinnmil quinnmil linked an issue Jan 3, 2025 that may be closed by this pull request
@quinnmil quinnmil changed the base branch from master to 802-parse-new-configuration-options January 3, 2025 23:16
@quinnmil quinnmil marked this pull request as draft January 3, 2025 23:16
@quinnmil quinnmil force-pushed the 804-add-sampling-logic branch from b135dc8 to 52363c2 Compare January 6, 2025 20:06
@quinnmil quinnmil marked this pull request as ready for review January 6, 2025 20:06
Base automatically changed from 802-parse-new-configuration-options to master January 6, 2025 20:08
@quinnmil quinnmil force-pushed the 804-add-sampling-logic branch from 52363c2 to cdd1345 Compare January 6, 2025 20:11
@quinnmil quinnmil force-pushed the 804-add-sampling-logic branch from cdd1345 to d396107 Compare January 6, 2025 20:14
@quinnmil quinnmil force-pushed the 804-add-sampling-logic branch from 08eb143 to f9d92f2 Compare January 7, 2025 21:43
@quinnmil quinnmil merged commit e121145 into master Jan 15, 2025
14 checks passed
@quinnmil quinnmil deleted the 804-add-sampling-logic branch January 15, 2025 01:43
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.

Add sampling logic
2 participants