Skip to content

ref(logging): configure grpc logger so its errors aren't dropped#116806

Merged
untitaker merged 3 commits into
masterfrom
grpc-logging-config
Jun 3, 2026
Merged

ref(logging): configure grpc logger so its errors aren't dropped#116806
untitaker merged 3 commits into
masterfrom
grpc-logging-config

Conversation

@untitaker
Copy link
Copy Markdown
Member

@untitaker untitaker commented Jun 3, 2026

sentry's LOGGING uses disable_existing_loggers: True and has no grpc logger entry, so grpc's own logging is dropped or nondeterministically routed depending on import order. grpc catches a lot of exceptions internally (e.g. request deserialization failures in the push-mode taskworker) and logs them on the grpc._common logger, so we want those to be reliably visible.

Configure grpc explicitly — ERROR, console, propagate: False — matching how other third-party loggers (arroyo, taskbroker_client, urllib3) are handled.

Context: getsentry/taskbroker#672 (closed) — originally attempted to log these in the client before realizing the fix belongs here.

🤖 Generated with Claude Code

untitaker and others added 2 commits June 3, 2026 13:18
Move the ingest-profiles taskbroker to the new kafka_clusters/kafka_topics
format. Raw mode moves onto the profiles topic's per-topic raw block, and a
retry topic is now mandatory for raw topics (raw messages aren't activations,
so retries can't loop back into the raw topic). Retries are routed to the main
taskworker topic so the default taskbroker picks them up instead of requiring
another broker.

Depends on taskbroker #668 (per-topic raw + mandatory-retry validation).

ref STREAM-1093

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
sentry's LOGGING uses disable_existing_loggers=True and has no `grpc` logger
entry. That makes grpc's own logging nondeterministic: if grpc's loggers are
instantiated before this config is applied they get disabled (silent), and
otherwise they propagate to root (console + a Sentry event).

This matters for the push-mode taskworker, which runs a grpc server via
taskbroker_client. When a PushTask body fails to deserialize, grpc logs
"Exception deserializing request!" at ERROR on the `grpc._common` logger and
aborts the call with INTERNAL — but whether that log is visible depends on
import order.

Configure `grpc` explicitly (ERROR, console, no propagation) so these failures
land on the console deterministically, matching how other third-party loggers
(arroyo, taskbroker_client, urllib3) are handled.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@untitaker untitaker requested review from a team as code owners June 3, 2026 20:06
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 3, 2026
@untitaker untitaker merged commit 9281ba5 into master Jun 3, 2026
85 checks passed
@untitaker untitaker deleted the grpc-logging-config branch June 3, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants