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

Better sampling override behavior #4014

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

Conversation

trask
Copy link
Member

@trask trask commented Jan 9, 2025

(icm 577578458)

Currently, this configuration:

      {
        "telemetryType": "request",
        "attributes": [
          {
            "key": "http.url",
            "value": ".*/health-check",
            "matchType": "regexp"
          }
        ],
        "percentage": 0,
        "id": "filter out health check"
      },
      {
        "telemetryType": "dependency",
        "attributes": [
          {
            "key": "db.statement",
            "value": "select count(*) from abc",
            "matchType": "strict"
          }
        ],
        "percentage": 50,
        "id": "filter out noisy jdbc"
      }

has the unexpected effect of capturing 50% of select count(*) from abc calls, even when they occur within the excluded health check.

this PR updates the behavior so that when a sampling override percentage is <100 and a parent dropped, then the span (with override percentage < 100) will also be dropped

TODO need to decide whether this affects statistical accuracy of item count

THOUGHT when parent span isn't sampled, it's a no-op, and so has no "sample rate" attribute available for children to check

@trask trask force-pushed the sampling-override-behavior branch 2 times, most recently from 59be9a0 to 97276ab Compare January 14, 2025 03:13
@trask trask changed the title More expected sampling override behavior Better sampling override behavior Jan 14, 2025
@trask trask force-pushed the sampling-override-behavior branch from 97276ab to 90d4ada Compare January 22, 2025 03:14
@trask trask force-pushed the sampling-override-behavior branch from 90d4ada to 11b4832 Compare January 22, 2025 03:15
@trask trask marked this pull request as ready for review January 22, 2025 15:31
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