Skip to content

Commit

Permalink
feat(profiling): Allow profiling sample rate to be passed from env (#24)
Browse files Browse the repository at this point in the history
* feat(profiling): Allow profiling sample rate to be passed from env

This sets a default profiling sample rate of 0 since not everyone may want profiling in CI due to cost concerns, but allows it to be enabled by passing it from the environment.

* Should be a float
  • Loading branch information
k-fish authored Jul 18, 2024
1 parent aedb216 commit ae9cdb0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pytest_sentry.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def __init__(self, *args, **kwargs):
"traces_sample_rate",
float(os.environ.get("PYTEST_SENTRY_TRACES_SAMPLE_RATE", 1.0)),
)
kwargs.setdefault("profiles_sample_rate", float(os.environ.get("PYTEST_SENTRY_PROFILES_SAMPLE_RATE", 0.0)))
kwargs.setdefault("_experiments", {}).setdefault(
"auto_enabling_integrations", True
)
Expand Down

0 comments on commit ae9cdb0

Please sign in to comment.