@@ -668,6 +668,26 @@ public function setTracePropagationTargets(array $tracePropagationTargets): self
668668 return $ this ;
669669 }
670670
671+ /**
672+ * Returns whether strict trace propagation is enabled or not.
673+ */
674+ public function isStrictTracePropagationEnabled (): bool
675+ {
676+ return $ this ->options ['strict_trace_propagation ' ];
677+ }
678+
679+ /**
680+ * Sets if strict trace propagation should be enabled or not.
681+ */
682+ public function enableStrictTracePropagation (bool $ strictTracePropagation ): self
683+ {
684+ $ options = array_merge ($ this ->options , ['strict_trace_propagation ' => $ strictTracePropagation ]);
685+
686+ $ this ->options = $ this ->resolver ->resolve ($ options );
687+
688+ return $ this ;
689+ }
690+
671691 /**
672692 * Gets a list of default tags for events.
673693 *
@@ -1186,6 +1206,7 @@ private function configureOptions(OptionsResolver $resolver): void
11861206 return null ;
11871207 },
11881208 'trace_propagation_targets ' => null ,
1209+ 'strict_trace_propagation ' => false ,
11891210 'tags ' => [],
11901211 'error_types ' => null ,
11911212 'max_breadcrumbs ' => self ::DEFAULT_MAX_BREADCRUMBS ,
@@ -1234,6 +1255,7 @@ private function configureOptions(OptionsResolver $resolver): void
12341255 $ resolver ->setAllowedTypes ('ignore_exceptions ' , 'string[] ' );
12351256 $ resolver ->setAllowedTypes ('ignore_transactions ' , 'string[] ' );
12361257 $ resolver ->setAllowedTypes ('trace_propagation_targets ' , ['null ' , 'string[] ' ]);
1258+ $ resolver ->setAllowedTypes ('strict_trace_propagation ' , 'bool ' );
12371259 $ resolver ->setAllowedTypes ('tags ' , 'string[] ' );
12381260 $ resolver ->setAllowedTypes ('error_types ' , ['null ' , 'int ' ]);
12391261 $ resolver ->setAllowedTypes ('max_breadcrumbs ' , 'int ' );
0 commit comments