@@ -94,13 +94,37 @@ def testing_environ_vars(env_devel_file: Path) -> EnvVarsDict:
9494 # ensure we do not use the bucket of simcore or so
9595 env_devel ["S3_BUCKET_NAME" ] = "pytestbucket"
9696
97+ # ensure OpenTelemetry is not enabled
98+ env_devel |= {
99+ x : "null"
100+ for x in (
101+ "AGENT_TRACING" ,
102+ "API_SERVER_TRACING" ,
103+ "AUTOSCALING_TRACING" ,
104+ "CATALOG_TRACING" ,
105+ "CLUSTERS_KEEPER_TRACING" ,
106+ "DATCORE_ADAPTER_TRACING" ,
107+ "DIRECTOR_TRACING" ,
108+ "DIRECTOR_V2_TRACING" ,
109+ "DYNAMIC_SCHEDULER_TRACING" ,
110+ "EFS_GUARDIAN_TRACING" ,
111+ "INVITATIONS_TRACING" ,
112+ "PAYMENTS_TRACING" ,
113+ "RESOURCE_USAGE_TRACKER_TRACING" ,
114+ "STORAGE_TRACING" ,
115+ "WB_DB_EL_TRACING" ,
116+ "WB_GC_TRACING" ,
117+ "WEBSERVER_TRACING" ,
118+ )
119+ }
120+
97121 return {key : value for key , value in env_devel .items () if value is not None }
98122
99123
100124@pytest .fixture (scope = "module" )
101125def env_file_for_testing (
102126 temp_folder : Path ,
103- testing_environ_vars : dict [ str , str ] ,
127+ testing_environ_vars : EnvVarsDict ,
104128 osparc_simcore_root_dir : Path ,
105129) -> Iterator [Path ]:
106130 """Dumps all the environment variables into an $(temp_folder)/.env.test file
@@ -118,10 +142,6 @@ def env_file_for_testing(
118142 file = fh ,
119143 )
120144 for key , value in sorted (testing_environ_vars .items ()):
121- # ensure OpenTelemetry is not enabled
122- if key .startswith ("TRACING_" ) or key .endswith ("_TRACING" ):
123- continue
124-
125145 # NOTE: python-dotenv parses JSON encoded strings correctly, but
126146 # writing them back shows an issue. if the original ENV is something like MY_ENV='{"correct": "encodedjson"}'
127147 # it goes to MY_ENV={"incorrect": "encodedjson"}!
0 commit comments