Repository navigation
Conversation
DefaultMetricsProcessor.ProcessAndSend calls SendAppLogRate(0, 0, tags) on every container-metrics tick for every container with a source_id, in addition to depot/log_streamer.logRateLimiter, which already emits the real log_rate/log_rate_limit gauge pair on its own ticker whenever container_metrics_report_interval (rep job property) is enabled. Both components send envelopes with the same metric-key set (source_id + instance_id), and CAPI's ContainerMetricBatcher deduplicates incoming envelopes by that key. Which value wins depends on arrival order, so the fabricated zero from this path intermittently displaces the real measurement in `cf app` / Log Cache output, making log rate limiting look disabled even when it is actively throttling. There is no reason for the metrics processor to emit this metric at all: it always sends 0, 0 — never a real reading — and removing it does not change the emitter that actually measures log rate. Added a spec asserting SendAppLogRate is never called by the metrics processor; log_rate now comes from exactly one place in this codebase, depot/log_streamer/log_rate_limiter.go:109. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
mariash
previously approved these changes
Sep 28, 2026
Gerg
reviewed
Sep 28, 2026
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.
Summary
App log rate sporadically incorrectly shows as 0 due to a fabricated metric emission that was recently added; remove the metric emission. See commit message for more details.
Backward Compatibility
Breaking Change? No