Skip to content

Commit

Permalink
fix(test): Randomly sample transactions for test runs (#22487)
Browse files Browse the repository at this point in the history
  • Loading branch information
untitaker authored Dec 11, 2020
1 parent 152a74d commit cf75de7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sentry/utils/pytest/sentry.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import absolute_import

import pytest

from sentry.utils.compat import mock
import os
from hashlib import md5
Expand Down Expand Up @@ -242,6 +244,7 @@ def pytest_collection_modifyitems(config, items):
- Filter tests that subclass SnubaTestCase as tests in `tests/acceptance` are not being marked as `snuba`
- Select tests based on group and group strategy
- Configure pytest-sentry
"""

Expand Down Expand Up @@ -288,3 +291,6 @@ def pytest_collection_modifyitems(config, items):
if len(discard) > 0:
items[:] = keep
config.hook.pytest_deselected(items=discard)

for item in items:
item.add_marker(pytest.mark.sentry_client({"traces_sample_rate": 0.1}))

0 comments on commit cf75de7

Please sign in to comment.