@@ -19,6 +19,7 @@ def test_is_span_disabled_default(self):
1919 options = BaseOptions ()
2020 assert not options .is_span_disabled (category = "logging" )
2121 assert not options .is_span_disabled (category = "databases" )
22+ assert not options .is_span_disabled (category = "stack" )
2223 assert not options .is_span_disabled (span_type = "redis" )
2324
2425 def test_disable_category (self ):
@@ -55,6 +56,7 @@ def test_env_var_disable_all(self, value, monkeypatch):
5556 assert options .is_span_disabled (category = "databases" ) is True
5657 assert options .is_span_disabled (category = "messaging" ) is True
5758 assert options .is_span_disabled (category = "protocols" ) is True
59+ assert options .is_span_disabled (category = "stack" ) is True
5860
5961 def test_env_var_disable_specific (self , monkeypatch ):
6062 monkeypatch .setenv ("INSTANA_TRACING_DISABLE" , "logging, redis" )
@@ -75,5 +77,17 @@ def test_yaml_config(self):
7577 assert options .is_span_disabled (span_type = "mysql" )
7678 assert not options .is_span_disabled (span_type = "redis" )
7779
80+ def test_disable_stack_category (self ):
81+ options = BaseOptions ()
82+ options .disabled_spans = ["stack" ]
83+ assert options .is_span_disabled (category = "stack" )
84+ assert not options .is_span_disabled (category = "logging" )
85+
86+ def test_env_var_disable_stack (self , monkeypatch ):
87+ monkeypatch .setenv ("INSTANA_TRACING_DISABLE" , "stack" )
88+ options = BaseOptions ()
89+ assert options .is_span_disabled (category = "stack" ) is True
90+ assert options .is_span_disabled (category = "logging" ) is False
91+
7892
7993# Made with Bob
0 commit comments