Skip to content

Add more logging when emitting Kafka messages - #515

Open
mvalik wants to merge 1 commit into
release-engineering:masterfrom
mvalik:vm_branch_kafka
Open

mvalik wants to merge 1 commit into
release-engineering:masterfrom
mvalik:vm_branch_kafka

Conversation

@mvalik

@mvalik mvalik commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Add a debug log before emitting message and an info log when message was accepted by a broker

@codecov

codecov Bot commented Oct 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.26%. Comparing base (c36fd95) to head (bb1d78a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #515      +/-   ##
==========================================
+ Coverage   93.24%   93.26%   +0.01%     
==========================================
  Files          57       57              
  Lines        4711     4721      +10     
  Branches      300      300              
==========================================
+ Hits         4393     4403      +10     
  Misses        260      260              
  Partials       58       58              
Flag Coverage Δ
unit-tests 93.26% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines +87 to +89
_log.debug(
"Emitting Kafka message to %s headers=%s body=%s", topic, headers, body
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I remember we have been logging the messages before, but it is not a good idea (it is a lot of data), unless they are logged in a trace log level disabled by default.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

WDYT about keeping only header then?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If this is related to verifying if the UMB message contains the right headers (because this should be handled by bridge), then it would be better to test it manually (e.g. set up a temporary UMB message consumer locally).

But I don't think this is important for anyone else but Datagrepper which is getting decommissioned anyway.

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