File tree 2 files changed +4
-3
lines changed
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 22
22
use Hyperf \Metric \Contract \GaugeInterface ;
23
23
use Hyperf \Metric \Contract \HistogramInterface ;
24
24
use Hyperf \Metric \Contract \MetricFactoryInterface ;
25
- use Hyperf \Stringable \Str ;
25
+ use Hyperf \Stringable \StrCache ;
26
26
use InfluxDB \Client ;
27
27
use InfluxDB \Database ;
28
28
use InfluxDB \Database \RetentionPolicy ;
@@ -129,6 +129,6 @@ protected function createPoint(Sample $sample): Point
129
129
private function getNamespace (): string
130
130
{
131
131
$ name = $ this ->config ->get ("metric.metric. {$ this ->name }.namespace " );
132
- return preg_replace ('#[^a-zA-Z0-9:_]# ' , '_ ' , Str ::snake ($ name ));
132
+ return preg_replace ('#[^a-zA-Z0-9:_]# ' , '_ ' , StrCache ::snake ($ name ));
133
133
}
134
134
}
Original file line number Diff line number Diff line change 30
30
use Hyperf \Metric \Exception \RuntimeException ;
31
31
use Hyperf \Metric \MetricFactoryPicker ;
32
32
use Hyperf \Stringable \Str ;
33
+ use Hyperf \Stringable \StrCache ;
33
34
use Hyperf \Support \Network ;
34
35
use Prometheus \CollectorRegistry ;
35
36
use Prometheus \Exception \MetricsRegistrationException ;
@@ -171,7 +172,7 @@ protected function customHandle(): void
171
172
private function getNamespace (): string
172
173
{
173
174
$ name = $ this ->config ->get ("metric.metric. {$ this ->name }.namespace " );
174
- return preg_replace ('#[^a-zA-Z0-9:_]# ' , '_ ' , Str ::snake ($ name ));
175
+ return preg_replace ('#[^a-zA-Z0-9:_]# ' , '_ ' , StrCache ::snake ($ name ));
175
176
}
176
177
177
178
private function getUri (string $ address , string $ job ): string
You can’t perform that action at this time.
0 commit comments