feat(consumer): log resolved consumer config on every start#8078
Open
phacops wants to merge 2 commits into
Open
feat(consumer): log resolved consumer config on every start#8078phacops wants to merge 2 commits into
phacops wants to merge 2 commits into
Conversation
The Rust consumers (rust_consumer and accepted_outcomes_consumer) resolve their full config from CLI args + storage definitions but never logged it, making it hard to confirm what a running consumer was actually configured with (topics, brokers, batch settings, retention, etc). Log the resolved ConsumerConfig as JSON at startup, right after it's parsed. Secrets (ClickHouse password, Sentry DSN, and Kafka credentials in broker configs such as sasl.password) are redacted so they never reach the logs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cfqpz6SMijmjzTCbLosEvG
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cfqpz6SMijmjzTCbLosEvG
untitaker
approved these changes
Jun 19, 2026
MeredithAnya
approved these changes
Jun 19, 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
The Rust consumers (
rust_consumerandaccepted_outcomes_consumer) resolve their full configuration from CLI args plus storage definitions, but never logged it. This makes it hard to confirm what a running consumer was actually configured with — resolved topics, broker config, batch settings, retention, message processor, etc.This PR logs the resolved
ConsumerConfigas JSON at startup, right after it's parsed from the payload passed in by the Python CLI. The logging is done in Rust (rather than the Python CLI) because that's where logging is already configured for these consumers — therust_consumer/accepted_outcomes_consumerPython entrypoints deliberately don't set up Python logging and rely on Rust's structured JSON tracing.Secret redaction
The config contains secrets, so a new
ConsumerConfig::redacted_for_logging()helper produces a JSON view with the following masked as[REDACTED]:passwordenv.sentry_dsnpasswordorsecret(e.g.sasl.password)All non-sensitive values (hosts, ports, topic names, batch settings, retention, etc.) are preserved.
Testing
test_redacted_for_loggingasserting secrets do not leak and non-sensitive values are preserved.cargo test --lib test_redacted_for_loggingpasses.🤖 Generated with Claude Code
Generated by Claude Code