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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

trask
Copy link
Member

@trask trask commented Jan 9, 2025

https://portal.microsofticm.com/imp/v5/incidents/details/577578458/summary

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 from bbf988d to 59be9a0 Compare January 14, 2025 01:41
@trask trask force-pushed the sampling-override-behavior branch 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
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