Azure / Azure/data-api-builder

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

Offen
#3,571 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
2.x health-endpoint
Vorherrschende Sprache
C#
Sterne
1.5k
Forks
370
Ø Merge
3 T. 17 Std.
Gemergte PRs (30 T.)
8

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, den Einstiegspunkt des Health-Checks für die Datenquelle und die Verarbeitung zu lokalisieren, die eine fehlgeschlagene SQL-Verbindung in die Schwellenwertmeldung umwandelt. Reproduziere anschließend den Fall eines nicht existierenden Servers und verifiziere dann, dass die Health-Antwort eine verbindungsbezogene Exception beibehält, während Schwellenwertdaten für tatsächlich langsame Requests erhalten bleiben.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp, sql
Bereich
databases, observability
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
58/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.