[Bug]: Healthcheck API calls cannot be excluded from API Platform logs
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
Please select the area the issue is related to
Gateway
Please select the aspect the issue is related to
Aspect/Logging (Log formats, instrumentation, improvements)
Description
Description
Health-check requests(/_gateway-health/ready and /_gateway-health/healthy) continue to appear in the following log outputs:
-
Router/access logs (
[rtr]output) – Envoy's stdout access logs do not have path-based filter. The requests are logged wheneverrouter.access_logs.enabled = true, regardless of theignore_path_prefixesconfiguration. -
Datalog/traffic logging output – These health-check requests to be excluded from datalog/traffic logging.
Expected Behaviour
Health-check requests under /_gateway-health should be excluded from:
- Router/access logs (
[rtr]stdout access logs). - Datalog/traffic logging output.
Proposed Fix
-
Router/access logs ([rtr])
Attach the same path-based access-log filter already used for the traffic-logging/analytics sink (collector.ignore_path_prefixes + the hardcoded /_gateway-health suppression) to the stdout access log sink as well. Currently that filter is only wired to the gRPC ALS sink, the file/stdout sink is created with no filter at all. Reusing the existing filter-builder for both sinks keeps them consistent with a small, self-contained change. -
Datalog/traffic logging (tracing spans)
Health-check requests currently still generate OpenTelemetry trace spans that get exported to the tracing backend, since span sampling is a separate mechanism (RandomSampling, no path-based exclusion) from the access-log filters above. Add a route-level tracing override on the health-check routes that forces sampling to 0% for those routes specifically, so no span is ever created for them, independent of the global tracing sampling rate.
Steps to Reproduce
- Enable
router.access_logs.enabled = true. - Configure the relevant traffic logging/datalog settings.
- Start the API Platform Gateway.
- Invoke:
/_gateway-health/ready/_gateway-health/healthy
- Observe that the requests are logged in the router stdout stream and datalog/traffic logging output.
Severity Level of the Issue
Severity/Minor (Non-critical functionality. Can be fixed in future releases)
Environment Details (with versions)
1.2.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing collector.ignore_path_prefixes filter-builder, the stdout access-log sink, and the /_gateway-health/ready and /_gateway-health/healthy route definitions. Inspect how tracing sampling is configured, then verify that both health-check paths are absent from router, traffic, and tracing outputs while other requests remain logged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100