@@ -183,6 +183,21 @@ public function setTracesSampleRate(?float $sampleRate): void
183
183
$ this ->options = $ this ->resolver ->resolve ($ options );
184
184
}
185
185
186
+ public function getProfilesSampleRate (): ?float
187
+ {
188
+ /** @var int|float|null $value */
189
+ $ value = $ this ->options ['profiles_sample_rate ' ] ?? null ;
190
+
191
+ return $ value ?? null ;
192
+ }
193
+
194
+ public function setProfilesSampleRate (?float $ sampleRate ): void
195
+ {
196
+ $ options = array_merge ($ this ->options , ['profiles_sample_rate ' => $ sampleRate ]);
197
+
198
+ $ this ->options = $ this ->resolver ->resolve ($ options );
199
+ }
200
+
186
201
/**
187
202
* Gets whether tracing is enabled or not. The feature is enabled when at
188
203
* least one of the `traces_sample_rate` and `traces_sampler` options is
@@ -848,6 +863,7 @@ private function configureOptions(OptionsResolver $resolver): void
848
863
'enable_tracing ' => null ,
849
864
'traces_sample_rate ' => null ,
850
865
'traces_sampler ' => null ,
866
+ 'profiles_sample_rate ' => null ,
851
867
'attach_stacktrace ' => false ,
852
868
'context_lines ' => 5 ,
853
869
'enable_compression ' => true ,
@@ -887,6 +903,7 @@ private function configureOptions(OptionsResolver $resolver): void
887
903
$ resolver ->setAllowedTypes ('enable_tracing ' , ['null ' , 'bool ' ]);
888
904
$ resolver ->setAllowedTypes ('traces_sample_rate ' , ['null ' , 'int ' , 'float ' ]);
889
905
$ resolver ->setAllowedTypes ('traces_sampler ' , ['null ' , 'callable ' ]);
906
+ $ resolver ->setAllowedTypes ('profiles_sample_rate ' , ['null ' , 'int ' , 'float ' ]);
890
907
$ resolver ->setAllowedTypes ('attach_stacktrace ' , 'bool ' );
891
908
$ resolver ->setAllowedTypes ('context_lines ' , ['null ' , 'int ' ]);
892
909
$ resolver ->setAllowedTypes ('enable_compression ' , 'bool ' );
0 commit comments