Skip to content

feat: tx error producer #51

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 9 commits into
base: dev
Choose a base branch
from
Open

feat: tx error producer #51

wants to merge 9 commits into from

Conversation

Lodek
Copy link
Member

@Lodek Lodek commented May 6, 2025

What:

This PR introduces a new utility which listens to Tx events published by SourceHub and relays them to Source's event queue (kafka).

Why:
SourceHub txs are executed upon block proposal as part of ABCI.
As consequence, tx errors are not written to the usual log stream, it's possible to recover these messages by setting error log to debug, but far too much noise comes along with it.
Furthermore, there are advantages to separating operational logs to application logs.
This approach solves these problems by directly extracting the logs from CometBFT events and writes it to a readily accessible event infrastructure which can be used to explore errors.

@Lodek Lodek self-assigned this May 6, 2025
@@ -1,25 +1,4 @@
FROM golang:1.23.8 as builder
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we might wanna have a separate dockerfile for the tx listener

Copy link
Member Author

Choose a reason for hiding this comment

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

I think you're right. After double checking the binary size, it's surprisingly large (140M). I'll revise that

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 1.47059% with 201 lines in your changes missing coverage. Please review.

Project coverage is 44.70%. Comparing base (868cca4) to head (378c982).
Report is 2 commits behind head on dev.

Files with missing lines Patch % Lines
cmd/tx_err_producer/main.go 0.00% 172 Missing ⚠️
sdk/listener.go 11.11% 24 Missing ⚠️
cmd/tx_listener/main.go 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #51      +/-   ##
==========================================
- Coverage   45.06%   44.70%   -0.36%     
==========================================
  Files         221      222       +1     
  Lines       13293    13474     +181     
==========================================
+ Hits         5990     6024      +34     
- Misses       6847     6992     +145     
- Partials      456      458       +2     

☔ View full report in Codecov by Sentry.
📢 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.

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.

3 participants