Include HTTP Response Status Codes in Consul Metrics
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 39
Description
#### Feature Description
Consul's current HTTP API metrics, such as `consul_api_http`, do not expose HTTP response status codes. This limits the ability to assess the correctness of API responses through metrics. Status codes are a fundamental indicator of success or failure, and their absence makes it difficult to evaluate the actual availability of the API in terms of both speed and correctness.
#### Use Case(s)
The primary use case is to compute API availability using the formula:
```
availability = (fast and successful responses) / total requests
```
"Successful" in this context refers to HTTP 2xx responses. "Fast" is defined by application-specific latency thresholds. Without visibility into status codes, it's not possible to accurately distinguish successful from failed API calls in metrics.
This requirement applies to environments where Consul is not deployed with service mesh features. Metrics derived from the control plane alone must support availability monitoring based on standard HTTP semantics.
Contributor guide
Research direction
The issue names Consul's HTTP API metrics, including consul_api_http, but no files or tests. Start by locating the instrumentation for these metrics and determine how non-service-mesh API responses are recorded. Done should mean the metrics expose HTTP response status codes so 2xx success and latency can be evaluated separately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, observability
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100