feat: 给 asynctaskext/busext 增加 Prometheus 处理耗时+QPS 埋点 - #736
Open
nicholasxuu wants to merge 1 commit into
Open
Conversation
新增 observability 包里的两个 Histogram 单例 asynctask_task_duration_seconds / bus_task_duration_seconds, config <NS>monitor_enable 开关可选开启,默认关闭零开销; 不自建 /metrics HTTP server,照搬 cachext 的既有惯例。 指标名/label(task_name/queue/status)/buckets 与 Python coast 库 (coast/celery.py)完全一致,可跨语言合并查询。asynctaskext 因 machinery 全局 hook 拿不到单次调用的成功/失败,status 固定 "unknown";busext 的 dispatch() 能拿到真实错误分支,status 为 success/failure/parse_error/invalid_message 之一。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or 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
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.
新增 observability 包里的两个 Histogram 单例
asynctask_task_duration_seconds / bus_task_duration_seconds, config monitor_enable 开关可选开启,默认关闭零开销;
不自建 /metrics HTTP server,照搬 cachext 的既有惯例。
指标名/label(task_name/queue/status)/buckets 与 Python coast 库 (coast/celery.py)完全一致,可跨语言合并查询。asynctaskext 因
machinery 全局 hook 拿不到单次调用的成功/失败,status 固定
"unknown";busext 的 dispatch() 能拿到真实错误分支,status 为
success/failure/parse_error/invalid_message 之一。