Closed ushell closed 3 years ago
metrics配置中如果采用PUSH_MODE方式(prometheus pushgateway),PROMETHEUS_PUSH_HOST仅支持http方式
PUSH_MODE
PROMETHEUS_PUSH_HOST
http
具体代码: https://github.com/hyperf/metric/blob/master/src/Adapter/Prometheus/MetricFactory.php#L161
建议代码:
if (! Str::contains($address, ['https://', 'http://'])) { $address = 'http://' . $address; }
可以提个 PR 过来优化一下
PR: #4
项目貌似readonly, 不能合并PR?
代码提交到hyperf/hyperf仓库
metrics配置中如果采用
PUSH_MODE
方式(prometheus pushgateway),PROMETHEUS_PUSH_HOST
仅支持http
方式具体代码: https://github.com/hyperf/metric/blob/master/src/Adapter/Prometheus/MetricFactory.php#L161
建议代码: