Repository navigation
fix(runtime,builder): health probes are not access-log traffic - #99
Merged
Merged
Conversation
A kubelet asks /healthz and /readyz every few seconds for the life of a pod and uvicorn's access log wrote one line per answer — 180 lines per pod every ten minutes on a cell, all "200 OK", shipped to the telemetry store as if they were requests. The agent now hands uvicorn a logging configuration (uvicorn's own default with one filter on the access handler) and the filter's module, in both places a service runs: written beside the project for a native run and copied into the image by the builder. A service that configures its own logging is untouched; every non-probe line is written exactly as before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
antoinetoussaint-byte
added a commit
that referenced
this pull request
Oct 21, 2026
… where the build context is (#100) #99 wrote uvicorn-log-config.json and codefly_uvicorn_logging.py into the render directory and COPY'd them from the context root; the build context is the service directory (or the assembled copy of it), so every image build failed at that COPY. They are now written into the project before any context is assembled — exactly where a native start writes them — and copied from code/ beside src. Co-authored-by: Antoine Toussaint <312536060+antoinetoussaint-byte@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A kubelet asks
/healthzand/readyzevery few seconds for the life of a pod, and uvicorn's access log writes one line per answer. On obin-staging the model service logged 180 such lines per pod every ten minutes, all200 OK, shipped to SigNoz as if they were requests. The trace of a real request already carries what an access line says; a probe hit says nothing anyone reads.Fix, at the emitter
The agent hands uvicorn a logging configuration — uvicorn's own default (
uvicorn.config.LOGGING_CONFIG) restated whole, with onefilters: [probes]on the access handler — and the filter's modulecodefly_uvicorn_logging.py(ProbeFilter: drops an access record whose request path is exactly/healthz|/readyz|/livez|/health|/ready|/live|/ping, query stripped; everything else passes). Both files are written in the two places a service runs:writeUvicornLogging(s.Service.SourceLocation);uv run uvicornputs the working directory onsys.path),--log-config uvicorn-log-config.jsonon the command line; the scaffold's.gitignorenames both files;COPY'd beside the code, and in theCMD.A service that configures its own logging is untouched:
--log-configshapes uvicorn's loggers only.Tests
TestUvicornLoggingDropsProbesAndNothingElse: the configuration names the filter on the access handler only, restates every default logger, the module definesProbeFilter, the path pattern matches the seven probe paths and nothing adjacent (/healthz/deep,/api/health-report,/pingback), and both files are rewritten whole.TestUvicornArgsReloadIsConditionalcarries--log-config.go test ./...green.Not verified: a container built by this agent on a cell; next on obin-staging when the model service rebuilds on the released agent.
🤖 Generated with Claude Code