Azure / Azure/data-api-builder

[Bug]: Bad connection string health check shows "threshold exceeded" instead of connection error

オープン
#3,571 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
2.x health-endpoint
主要言語
C#
スター
1.5k
フォーク
370
平均マージ
3日 22時間
マージ済み PR(30日)
9

説明

When the data source connection string points to a non-existent server, the health check reports `"The threshold for executing the request has exceeded."` instead of a connection error.

Operators monitoring health endpoints cannot determine the root cause of an Unhealthy status. A threshold exceeded vs. connection failure require very different remediation actions.

## Expected

The health check should report a connection-related exception, e.g.:
```json
{
"status": "Unhealthy",
"name": "primary-sql-db",
"exception": "A network-related or instance-specific error occurred while establishing a connection to SQL Server.",
"tags": ["data-source"]
}
```

## Actual

```json
{
"status": "Unhealthy",
"name": "primary-sql-db",
"exception": "The threshold for executing the request has exceeded.",
"tags": ["data-source"],
"data": {"response-ms": 137, "threshold-ms": 1500}
}
```

The actual connection failure gets swallowed and replaced with a generic threshold message. This makes it impossible to distinguish between "database is slow" and "database is unreachable" from the health response alone.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、データソースのヘルスチェックのエントリーポイントと、失敗した SQL 接続をしきい値メッセージに変換する処理を特定します。次に、存在しないサーバーのケースを再現し、その後、ヘルスレスポンスが接続関連の例外を保持する一方で、実際に遅いリクエストについてはしきい値データが残ることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, sql
領域
databases, observability
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
58/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。