Skip to content

Commit 07aa45a

Browse files
committed
add min version check
1 parent d3fef9a commit 07aa45a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sentry_sdk/integrations/statsig.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
from typing import Any, TYPE_CHECKING
33

44
from sentry_sdk.feature_flags import add_feature_flag
5-
from sentry_sdk.integrations import Integration, DidNotEnable
5+
from sentry_sdk.integrations import Integration, DidNotEnable, _check_minimum_version
6+
from sentry_sdk.utils import parse_version
67

78
try:
89
from statsig import statsig as statsig_module
10+
from statsig.version import __version__ as STATSIG_VERSION
911
except ImportError:
1012
raise DidNotEnable("statsig is not installed")
1113

@@ -19,6 +21,9 @@ class StatsigIntegration(Integration):
1921
@staticmethod
2022
def setup_once():
2123
# type: () -> None
24+
version = parse_version(STATSIG_VERSION)
25+
_check_minimum_version(StatsigIntegration, version, "statsig")
26+
2227
# Wrap and patch evaluation method(s) in the statsig module
2328
old_check_gate = statsig_module.check_gate
2429

0 commit comments

Comments
 (0)