-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimized the code of Hyperf\Metric\Adapter\Prometheus\Redis
which allowed to rewrite the prefix about redis keys.
#5702
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
yansongda
commented
May 7, 2023
•
edited
edited
- PROMETHEUS_REDIS_GATHER_KEY_SUFFIX 与 PROMETHEUS_REDIS_SUFFIX 做成可配置项
- 优化重构 Prometheus 的 Redis Adapter 代码
- 增加单元测试
yansongda
changed the title
refactor: 重构 prometheus adapter
「metric」refactor: 重构 prometheus adapter
May 7, 2023
yansongda
changed the title
「metric」refactor: 重构 prometheus adapter
「metric」「BC」refactor: 重构 prometheus adapter
May 7, 2023
有办法做到不 BC 么? |
比如做成配置项,定义出来,默认值是以前的,新版的可以自定义,然后 3.1 版本,再都换成新的统一的 |
有道理,我抽时间处理下 |
yansongda
changed the title
「metric」「BC」refactor: 重构 prometheus adapter
「metric」refactor: 重构 prometheus adapter
May 14, 2023
Ready for review |
huangdijia
requested changes
May 15, 2023
…to metric-bc-3.1-prefix
https://github.com/PromPHP/prometheus_client_php/blob/main/src/Prometheus/Storage/Redis.php 不能直接用这个? // RedisFactory
// \Prometheus\Storage\Redis::setPrefix(...);
// \Prometheus\Storage\Redis::setMetricGatherKeySuffix(...);
$redis = new \Prometheus\Storage\Redis();
(fun() => $this->redis = di(\Rdis::class))->call($redis);
return $redis; |
…n and set prefix handling
奇怪这个为啥一直 CI 会过不了?有哪里错了吗? |
应该是没有rebase master分支 |
limingxinleo
changed the title
「metric」refactor: 重构 prometheus adapter
Optimized the code of May 18, 2023
Hyperf\Metric\Adapter\Prometheus\Redis
which allowed to rewrite the prefix about redis keys.
limingxinleo
approved these changes
May 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.