diff --git a/src/sentry/utils/sdk.py b/src/sentry/utils/sdk.py index c70f8f8ce75444..d9e9f15967f53b 100644 --- a/src/sentry/utils/sdk.py +++ b/src/sentry/utils/sdk.py @@ -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: @@ -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]