-
Notifications
You must be signed in to change notification settings - Fork 524
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
sampling: add trace group sampling reservoirs #4182
Conversation
Introduce a type for maintaining a collection of trace groups. For each trace group we measure the observed ingest rate for the trace group (number of root traces per sampling interval), and maintain a weighted random sampling reservoir for recording trace IDs. Trace IDs are weighted by root transaction duration, which means slower traces will have a greater chance of being captured.
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
- better name for decay factor - fix doc comments to reflect reality - fix criteria for removing trace groups
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review; and thanks for all the comments - very helpful!
* sampling: add trace group sampling reservoirs Introduce a type for maintaining a collection of trace groups. For each trace group we measure the observed ingest rate for the trace group (number of root traces per sampling interval), and maintain a weighted random sampling reservoir for recording trace IDs. Trace IDs are weighted by root transaction duration, which means slower traces will have a greater chance of being captured. * Address self-review comments - better name for decay factor - fix doc comments to reflect reality - fix criteria for removing trace groups * Update x-pack/apm-server/sampling/groups.go * Remove unnecessary variable assignment
* sampling: add trace group sampling reservoirs Introduce a type for maintaining a collection of trace groups. For each trace group we measure the observed ingest rate for the trace group (number of root traces per sampling interval), and maintain a weighted random sampling reservoir for recording trace IDs. Trace IDs are weighted by root transaction duration, which means slower traces will have a greater chance of being captured. * Address self-review comments - better name for decay factor - fix doc comments to reflect reality - fix criteria for removing trace groups * Update x-pack/apm-server/sampling/groups.go * Remove unnecessary variable assignment
Motivation/summary
Introduce a type for maintaining a collection of trace groups.
For each trace group we measure the observed ingest rate for
the trace group (number of root traces per sampling interval),
and maintain a weighted random sampling reservoir for recording
trace IDs. Trace IDs are weighted by root transaction duration,
which means slower traces will have a greater chance of being
captured.
Metrics/monitoring for this will come later.
Checklist
- [ ] I have updated CHANGELOG.asciidocI have considered changes for:
- [ ] documentation- [ ] logging (add log lines, choose appropriate log selector, etc.)- [ ] metrics and monitoring (create issue for Kibana team to add metrics to visualizations, e.g. Kibana#44001)- [ ] telemetry- [ ] Elasticsearch Service (https://cloud.elastic.co)- [ ] Elastic Cloud Enterprise (https://www.elastic.co/products/ece)- [ ] Elastic Cloud on Kubernetes (https://www.elastic.co/elastic-cloud-kubernetes)How to test these changes
make test
Related issues
None.