File tree 1 file changed +13
-7
lines changed
1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -358,12 +358,6 @@ void dd_tags_add_tags(
358
358
// tag _dd.runtime_family
359
359
_set_runtime_family (span );
360
360
361
- if (_force_keep ) {
362
- dd_trace_set_priority_sampling_on_span_zobj (
363
- span , PRIORITY_SAMPLING_USER_KEEP , DD_MECHANISM_MANUAL );
364
- mlog (dd_log_debug , "Updated sampling priority to user_keep" );
365
- }
366
-
367
361
if (zend_llist_count (& _appsec_json_frags ) == 0 ) {
368
362
if (!server ) {
369
363
return ;
@@ -406,7 +400,19 @@ void dd_tags_add_tags(
406
400
407
401
void dd_tags_add_blocked () { _blocked = true; }
408
402
409
- void dd_tags_set_sampling_priority () { _force_keep = true; }
403
+ void dd_tags_set_sampling_priority ()
404
+ {
405
+ if (_force_keep ) {
406
+ return ;
407
+ }
408
+
409
+ zend_object * nullable span = dd_req_lifecycle_get_cur_span ();
410
+ dd_trace_set_priority_sampling_on_span_zobj (
411
+ span , PRIORITY_SAMPLING_USER_KEEP , DD_MECHANISM_MANUAL );
412
+ mlog (dd_log_debug , "Updated sampling priority to user_keep" );
413
+
414
+ _force_keep = true;
415
+ }
410
416
411
417
static void _zend_string_release_indirect (void * s )
412
418
{
You can’t perform that action at this time.
0 commit comments