Skip to content

Commit

Permalink
feat(sdk): Enable trace and profile sampling on dev mode (#81760)
Browse files Browse the repository at this point in the history
This allows one to use Spotlight when it is enabled
  • Loading branch information
BYK authored Dec 6, 2024
1 parent 011b24a commit a61a759
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1546,31 +1546,31 @@ def custom_parameter_sort(parameter: dict) -> tuple[str, int]:
# ----

# sample rate for transactions initiated from the frontend
SENTRY_FRONTEND_APM_SAMPLING = 0
SENTRY_FRONTEND_APM_SAMPLING = 1 if DEBUG else 0

# sample rate for transactions in the backend
SENTRY_BACKEND_APM_SAMPLING = 0
SENTRY_BACKEND_APM_SAMPLING = 1 if DEBUG else 0

# Sample rate for symbolicate_event task transactions
SENTRY_SYMBOLICATE_EVENT_APM_SAMPLING = 0
SENTRY_SYMBOLICATE_EVENT_APM_SAMPLING = 1 if DEBUG else 0

# Sample rate for the process_event task transactions
SENTRY_PROCESS_EVENT_APM_SAMPLING = 0
SENTRY_PROCESS_EVENT_APM_SAMPLING = 1 if DEBUG else 0

# sample rate for relay's cache invalidation task
SENTRY_RELAY_TASK_APM_SAMPLING = 0
SENTRY_RELAY_TASK_APM_SAMPLING = 1 if DEBUG else 0

# sample rate for ingest consumer processing functions
SENTRY_INGEST_CONSUMER_APM_SAMPLING = 0
SENTRY_INGEST_CONSUMER_APM_SAMPLING = 1 if DEBUG else 0

# sample rate for suspect commits task
SENTRY_SUSPECT_COMMITS_APM_SAMPLING = 0
SENTRY_SUSPECT_COMMITS_APM_SAMPLING = 1 if DEBUG else 0

# sample rate for post_process_group task
SENTRY_POST_PROCESS_GROUP_APM_SAMPLING = 0
SENTRY_POST_PROCESS_GROUP_APM_SAMPLING = 1 if DEBUG else 0

# sample rate for all reprocessing tasks (except for the per-event ones)
SENTRY_REPROCESSING_APM_SAMPLING = 0
SENTRY_REPROCESSING_APM_SAMPLING = 1 if DEBUG else 0

# ----
# end APM config
Expand Down Expand Up @@ -2545,7 +2545,7 @@ def custom_parameter_sort(parameter: dict) -> tuple[str, int]:
# traces_sample_rate. So that means the true sample rate will be approximately
# traces_sample_rate * profiles_sample_rate
# (subject to things like the traces_sampler)
SENTRY_PROFILES_SAMPLE_RATE = 0
SENTRY_PROFILES_SAMPLE_RATE = 1 if DEBUG else 0

# We want to test a few schedulers possible in the profiler. Some are platform
# specific, and each have their own pros/cons. See the sdk for more details.
Expand Down

0 comments on commit a61a759

Please sign in to comment.