Bug: No telemetry recorded for failed requests
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- java
调研方向
从 src/main/java/dev/openfga/sdk/api/client/HttpRequestAttempt.java 开始,重点关注第 211-221 行附近成功路径上的指标记录,以及重试次数耗尽和不可重试错误的终止失败路径。确保失败请求和成功请求都会记录 requestDuration 和 queryDuration,同时保留现有的状态码区分。
由索引模型根据 Issue 内容生成。
描述
Summary
In src/main/java/dev/openfga/sdk/api/client/HttpRequestAttempt.java, when a request fails permanently (max retries exceeded, non-retryable error), requestDuration and queryDuration metrics are never recorded. Only the success path (~line 211-221) records metrics.
Impact
- Error rates are invisible via telemetry
- Request duration for failed calls is not tracked
- Users cannot build alerting/dashboards on error patterns
- Failed requests are a silent gap in observability
Proposed Fix
Record requestDuration on all terminal paths (success and failure), not just success. The http.response.status_code attribute already distinguishes success from failure, so existing dashboards filtering by status code will continue to work correctly.
This could be done with a try/finally pattern or by recording metrics just before throwing in the error paths.
Related
- PR #290 (telemetry instance sharing fix)
- 主要语言
- Java
- 星标
- 55
- 派生
- 26
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openfga/java-sdk 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
Make client-credentials token refresh buffer and jitter configurable可能已有人在做 @dpkass 于 30 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 72/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
openfga/java-sdk#370 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
openfga/java-sdk#361 · 1 个 reaction ·
维护者通常 1 天内回复
相似的 Issue
-
enhancement good first issue
难度 2/5 半天 新手友好度 66/100
apache/fineract-consumer-facing#175 ·
维护者通常 1 天内回复
-
[BUG] 订单:会员凭订单号即可取消其他会员的待付款订单(取消接口不校验订单归属)可能已有人在做 @dadiyang 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
macrozheng/mall#1016 ·
-
[Bug] The producer summary counts an unreported client version as a second version and warns about a version mix可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
apache/rocketmq-dashboard#6110 ·
维护者通常 4 天内回复
-
Feature:Resolution
难度 2/5 1-3 小时 新手友好度 72/100
intellij-elixir/intellij-elixir#4396 ·
维护者通常 1 天内回复
-
Python 3.15 support可能已有人在做 @amnesiaof 今天认领。 未关闭L: python L: python:uv
难度 2/5 1-3 小时 新手友好度 72/100
dependabot/dependabot-core#16524 · 1 条评论 ·
维护者通常 1 天内回复