99from ddtrace .internal .process_tags import ENTRYPOINT_TYPE_TAG
1010from ddtrace .internal .process_tags import ENTRYPOINT_WORKDIR_TAG
1111from ddtrace .internal .process_tags import normalize_tag_value
12- from ddtrace .internal .settings ._config import config
12+ from ddtrace .internal .settings .process_tags import process_tags_config as config
1313from tests .subprocesstest import run_in_subprocess
1414from tests .utils import TracerTestCase
1515from tests .utils import process_tag_reload
@@ -79,17 +79,17 @@ def test_normalize_tag(input_tag, expected):
7979class TestProcessTags (TracerTestCase ):
8080 def setUp (self ):
8181 super (TestProcessTags , self ).setUp ()
82- self ._original_process_tags_enabled = config ._process_tags_enabled
82+ self ._original_process_tags_enabled = config .enabled
8383 self ._original_process_tags = process_tags .process_tags
8484
8585 def tearDown (self ):
86- config ._process_tags_enabled = self ._original_process_tags_enabled
86+ config .enabled = self ._original_process_tags_enabled
8787 process_tags .process_tags = self ._original_process_tags
8888 super ().tearDown ()
8989
9090 @pytest .mark .snapshot
9191 def test_process_tags_deactivated (self ):
92- config ._process_tags_enabled = False
92+ config .enabled = False # type: ignore[assignment]
9393 process_tag_reload ()
9494
9595 with self .tracer .trace ("test" ):
@@ -98,7 +98,7 @@ def test_process_tags_deactivated(self):
9898 @pytest .mark .snapshot
9999 def test_process_tags_activated (self ):
100100 with patch ("sys.argv" , [TEST_SCRIPT_PATH ]), patch ("os.getcwd" , return_value = TEST_WORKDIR_PATH ):
101- config ._process_tags_enabled = True
101+ config .enabled = True # type: ignore[assignment]
102102 process_tag_reload ()
103103
104104 with self .tracer .trace ("parent" ):
@@ -108,7 +108,7 @@ def test_process_tags_activated(self):
108108 @pytest .mark .snapshot
109109 def test_process_tags_edge_case (self ):
110110 with patch ("sys.argv" , ["/test_script" ]), patch ("os.getcwd" , return_value = TEST_WORKDIR_PATH ):
111- config ._process_tags_enabled = True
111+ config .enabled = True # type: ignore[assignment]
112112 process_tag_reload ()
113113
114114 with self .tracer .trace ("span" ):
@@ -117,7 +117,7 @@ def test_process_tags_edge_case(self):
117117 @pytest .mark .snapshot
118118 def test_process_tags_error (self ):
119119 with patch ("sys.argv" , []), patch ("os.getcwd" , return_value = TEST_WORKDIR_PATH ):
120- config ._process_tags_enabled = True
120+ config .enabled = True # type: ignore[assignment]
121121
122122 with self .override_global_config (dict (_telemetry_enabled = False )):
123123 with patch ("ddtrace.internal.process_tags.log" ) as mock_log :
@@ -137,7 +137,7 @@ def test_process_tags_error(self):
137137 @run_in_subprocess (env_overrides = dict (DD_TRACE_PARTIAL_FLUSH_ENABLED = "true" , DD_TRACE_PARTIAL_FLUSH_MIN_SPANS = "2" ))
138138 def test_process_tags_partial_flush (self ):
139139 with patch ("sys.argv" , [TEST_SCRIPT_PATH ]), patch ("os.getcwd" , return_value = TEST_WORKDIR_PATH ):
140- config ._process_tags_enabled = True
140+ config .enabled = True # type: ignore[assignment]
141141 process_tag_reload ()
142142
143143 with self .override_global_config (dict (_partial_flush_enabled = True , _partial_flush_min_spans = 2 )):
0 commit comments