GraphQL failed-request events use the server's error message, which can contain variable values
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
調査の方向性
Start with src/Sentry/SentryGraphQLHttpFailedRequestHandler.cs, especially errorsElement[0].GetProperty("message") in DoEnsureSuccessfulResponse, and compare the three options described in the issue with sentry-java's behavior. Decide how the message should avoid exposing variable values while accounting for the IncomingResponseBody setting and title changes; done means the chosen behavior is implemented and covered by tests.
索引モデルが issue の本文から書いたものです。
説明
SentryGraphQLHttpFailedRequestHandler uses the server's errors[0].message as the exception message. Many GraphQL servers include the values of bad variables in that message, for example graphql-js's Variable "$id" got invalid value .... No DataCollection option covers the message, so variable values can reach Sentry even with DataCollection.GraphQL.Variables = false or SendDefaultPii = false.
This isn't a regression. The handler has always done this, and #5934 keeps it. It came up in the automated review of #5934.
sentry-java doesn't have this problem. Its Apollo interceptors build the message from the operation (GraphQL Request failed, name: ..., type: ...), and the server's response is attached only as the response body, gated by httpBodies.incomingResponse.
Options
Each of these changes what users see, which is why none of them is in #5934:
- Remove the echoed variable values from the message. Not reliable: the message is free text from the server, and a short value such as
1would match unrelated text. - Use the server's message only when
IncomingResponseBodyis on. The message is part of the response body, so this is arguably the right gate. But withoutConfigureDataCollectionthat gate followsSendDefaultPii, so users with it off would get a generic message instead of the one they get today. - Build the message as sentry-java does, from the operation name and type. This changes the message for everyone.
The message becomes the issue title in Sentry, so the last two options change titles. Grouping wouldn't change when the request body can be read, since the fingerprint is the operation name, operation type and status code.
Where
src/Sentry/SentryGraphQLHttpFailedRequestHandler.cs:errorsElement[0].GetProperty("message")inDoEnsureSuccessfulResponse.
Related: #5420, #5432
- 主要言語
- C#
- スター
- 775
- フォーク
- 262
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 118
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry-dotnet のほかの issue
-
chore: remove stale IL3050/IL3053 workaround from the iOS sample対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンState: Needs Discussion
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
getsentry/sentry-dotnet#6071 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Heap dumps: every SDK shutdown logs "Error waiting for GarbageCollectionMonitor task to complete"対応中かも @pcbeingused33 が今日担当しました。 オープンState: Needs Discussion
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
getsentry/sentry-dotnet#6039 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
.NET Platform: Android Task
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
getsentry/sentry-dotnet#6020 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Move the Blazor WebAssembly sample off the deprecated DevServer対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン.NET Framework: Blazor
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
getsentry/sentry-dotnet#5906 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Docs MSBuild Needs Docs Update
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getsentry/sentry-dotnet#5691 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
getsentry/sentry-dotnet の issue をすべて見る
似ている issue
-
In-car displays show 0 km/h and P while the AV drives対応中かも @bazilinskyy が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
bazilinskyy/coupled-sim#366 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
BaryoDev/umbraco-pwa#196 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
microsoft/fluentui-blazor#5688 ·
メンテナーはふだん 1 日以内に返信
-
bug flaky lsp-transport small
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信