Skip to content

Commit

Permalink
fix: Temporarily sampleassemble_dif at 100% for sentry-test/rust (#…
Browse files Browse the repository at this point in the history
…78252)

In order to get some insight into
#78251.
  • Loading branch information
loewenheim authored Sep 27, 2024
1 parent eb6147e commit 8203c4e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/sentry/utils/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from sentry.utils.db import DjangoAtomicIntegration
from sentry.utils.flag import get_flags_serialized
from sentry.utils.rust import RustInfoIntegration
from sentry.utils.safe import get_path

# Can't import models in utils because utils should be the bottom of the food chain
if TYPE_CHECKING:
Expand Down Expand Up @@ -194,6 +195,14 @@ def traces_sampler(sampling_context):
if "celery_job" in sampling_context:
task_name = sampling_context["celery_job"].get("task")

# Temporarily sample the `assemble_dif` task at 100% for the
# sentry-test/rust project for debugging purposes
if (
task_name == "sentry.tasks.assemble.assemble_dif"
and get_path(sampling_context, "celery_job", "kwargs", "project_id") == 1041156
):
return 1.0

if task_name in SAMPLED_TASKS:
return SAMPLED_TASKS[task_name]

Expand Down

0 comments on commit 8203c4e

Please sign in to comment.