使用 Redis 存储指标时报错
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- php, prometheus, redis
- Domain
- databases, observability
Research direction
Start with config/autoload/dependencies.php and the Redis implementation at vendor/hyperf/metric/src/Adapter/Prometheus/Redis.php. Reproduce the framework startup using the RedisStorageFactory configuration and inspect the Adapter contract named in the fatal error. Done means the Redis-backed metrics configuration starts without the reported abstract-method failure.
Written by the indexing model from the issue text.
Description
在config/autoload/dependencies.php 中更换为 Redis 存储:
return [
Prometheus\Storage\Adapter::class => Hyperf\Metric\Adapter\Prometheus\RedisStorageFactory::class,
];
启动框架报错:
PHP Fatal error: Class Hyperf\Metric\Adapter\Prometheus\Redis contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Prometheus\Storage\Adapter::updateSummary) in /srv/hyperf/vendor/hyperf/metric/src/Adapter/Prometheus/Redis.php on line 24
- Dominant language
- PHP
- Stars
- 5
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hyperf/metric
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
监听OnPipeMessage事件异常Open
Difficulty 4/5 3-5 days Newbie friendliness 20/100
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Phauthentic/cognitive-code-analysis#94 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 95/100
My-Little-Forum/mylittleforum#936 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
mailcow/mailcow-dockerized#7652 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100