File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -178,8 +178,8 @@ def get_project_key():
178
178
179
179
180
180
def traces_sampler (sampling_context ):
181
- wsgi_path = sampling_context .get ("wsgi_environ" , {}). get ( "PATH_INFO " )
182
- if wsgi_path and wsgi_path in SAMPLED_ROUTES :
181
+ wsgi_path = sampling_context .get ("url.path " )
182
+ if wsgi_path in SAMPLED_ROUTES :
183
183
return SAMPLED_ROUTES [wsgi_path ]
184
184
185
185
# Apply sample_rate from custom_sampling_context
@@ -192,8 +192,7 @@ def traces_sampler(sampling_context):
192
192
return sampling_context ["parent_sampled" ]
193
193
194
194
if "celery_job" in sampling_context :
195
- task_name = sampling_context ["celery_job" ].get ("task" )
196
-
195
+ task_name = sampling_context .get ("celery.job.task" )
197
196
if task_name in SAMPLED_TASKS :
198
197
return SAMPLED_TASKS [task_name ]
199
198
You can’t perform that action at this time.
0 commit comments