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

Introduce a configurable sample rate #149

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

Conversation

ethangunderson
Copy link

Hello 👋,

The projects where we use Spandex operate at a fairly large scale. A byproduct of this is that it becomes cost prohibitive to send all traces to Datadog. To solve this, we implemented our own Spandex sender that implements a sampling rate to determine trace priority before sending the trace to the Datadog agent.

This works pretty well, but falls apart when we use continue_trace to setup distributed tracing between different processes. Since priority is determined at the time of sending the trace, each trace priority is independently determined instead of the decision being made once and passed via trace context.

To solve for this I've added an optional configuration for a sampling rate. This effectively enables head based sampling as described in the Datadog docs.

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