8000 Reduce Kafka per event logging to debug and include Kafka offset by tillrohrmann · Pull Request #3285 · restatedev/restate · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Reduce Kafka per event logging to debug and include Kafka offset #3285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tillrohrmann
Copy link
Contributor

This commit improves a little bit the logging we do when consuming from Kafka. It reduces the per event log level to debug and includes the Kafka offset in spans/events for easier correlation what is being read.

Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reduces per-event Kafka logging to debug level and enriches spans with the Kafka offset for better traceability.

  • Lower per-message logs to debug and include messaging.kafka.offset
  • Add #[instrument] to dispatch_kafka_event and topic_partition_queue_consumption_loop
  • Simplify consumer task logging by removing info_span and using structured debug!

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
crates/ingress-kafka/src/dispatcher.rs Updated import, added #[instrument(level = "debug", …)] to include offset
crates/ingress-kafka/src/consumer_task.rs Switched from info_span to debug!, added instrumentation on loop, trimmed fields

…ontroller

This PR changes how the ClusterController learns about alive/dead nodes. Now
it uses the restate_core::cluster_state::ClusterState to update the ObservedClusterState
which is used by the LogsController and the Scheduler.

As part of this commit, we hide the implementation details of the ObservedClusterState
to allow for easier evolutions of it. Moreover, it simplifies the error handling of the
LogsController by panicking if the loglet params cannot be parsed because it is a
situation from which the Restate server cannot recover until the metadata gets fixed.
This commit improves a little bit the logging we do when consuming from Kafka.
It reduces the per event log level to debug and includes the Kafka offset in
spans/events for easier correlation what is being read.
@tillrohrmann tillrohrmann force-pushed the improve-kafka-logging branch from e30634f to 397ab7d Compare May 16, 2025 14:03
Copy link
Contributor
@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only question/ask for this review is if this changes how the trace looks on user tracing jaeger, if you verified it or idk.

@tillrohrmann
Copy link
Contributor Author

I didn't verify it. Will do so and post a screenshot of the traces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0