[Bug]: content-length-guardrail policy does not mark streamed violations in analytics
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 56/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- go
調査の方向性
Start by locating the content-length-guardrail policy implementation and comparing the streamed response violation path with the request and buffered response paths that set analytics metadata. Trace where the stream violation sets its error and fault, then check the analytics event for isGuardrailHit and guardrailName. Done means streamed violations include both fields, matching the other violation paths.
索引モデルが issue の本文から書いたものです。
説明
Please select the area the issue is related to
Gateway
Please select the aspect the issue is related to
Aspect/Monitoring (Metrics, observability, health checks, alerts)
Description
The content-length-guardrail policy does not mark a streamed response violation in analytics. The analytics event has no isGuardrailHit or guardrailName metadata.
Request violations and buffered response violations set both fields. When the policy ends a stream for a violation, it sets the error and the fault but leaves the analytics metadata empty.
The enforcement itself works. The client gets the guardrail's error event and the stream ends. Only the analytics record is incomplete. Dashboards and reports that count guardrail hits from this metadata miss every streamed violation.
Steps to Reproduce
- Create a REST API with the
content-length-guardrailpolicy on an operation, with analytics enabled on the Gateway:{"name":"content-length-guardrail","version":"v1","params":{"response":{"enabled":true,"min":1,"max":5}}} - Send a request whose upstream replies with an SSE stream. The first delta has more than 5 bytes of content:
data: {"choices":[{"delta":{"content":"this is longer than five bytes"}}]} data: [DONE] - The client gets the guardrail's SSE error event, and the stream ends. This is expected.
- Read the request's analytics event. It has neither
isGuardrailHitnorguardrailNamein its metadata. - Repeat with a request over a request-side
max, or a buffered response overmax. The event hasisGuardrailHit: trueandguardrailName: content-length-guardrail.
Severity Level of the Issue
Severity/Minor (Non-critical functionality. Can be fixed in future releases)
Environment Details (with versions)
- Policy:
content-length-guardrailv1.1.0, wso2/gateway-controllers main (4f1520a8) - Gateway versions: 1.1.0 (patched), 1.2.0 and latest (
main-59dcd51) - macOS 27.0.1 (Apple silicon), Colima 0.10.3, Docker Engine 29.5.2
- 主要言語
- Go
- スター
- 85
- フォーク
- 137
- 平均マージ
- 1日 12時間
- マージ済み PR(30日)
- 247
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
wso2/api-platform のほかの issue
-
Area/DeveloperPortal Aspect/UI Severity/Minor Type/Bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
wso2/api-platform#4369 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: host-rewrite policy documentation lists fewer allowed host characters than the policy acceptsオープンArea/Policies Aspect/Other Severity/Trivial Type/Bug
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
wso2/api-platform#4355 ·
メンテナーはふだん 1 日以内に返信
-
Area/Gateway Aspect/API Severity/Minor Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
wso2/api-platform#4348 ·
メンテナーはふだん 1 日以内に返信
-
Aspect/AI Aspect/API. Severity/Major
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
wso2/api-platform#4343 ·
メンテナーはふだん 1 日以内に返信
-
Area/Policies Aspect/Configuration Severity/Minor Type/Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
wso2/api-platform#4330 ·
メンテナーはふだん 1 日以内に返信
wso2/api-platform の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
progress-deadline annotation accepts "0s" although validation says it must be positive対応中かも @BahaaMattar が今日担当しました。 オープンarea/API kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
api cleanup
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
router-for-me/CLIProxyAPI#7708 ·
メンテナーはふだん 1 日以内に返信