Skip to content
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

feat: add an instrument to portal-bridge for more clear logs #1081

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

KolbyML
Copy link
Member

@KolbyML KolbyML commented Jan 6, 2024

What was wrong?

I was trying to read through bridge logs and I couldn't tell if they were coming from the history or beacon bridge. This makes grepping and debugging hard.

How was it fixed?

with this change all the logs generated by the history bridge are marked by history and all the logs generated by the beacon bridge are tagged with beacon

2024-01-06T15:47:10.139336Z  INFO history: surf::middleware::logger::native: request completed    
2024-01-06T15:47:10.143257Z DEBUG history:send_async{method=POST uri=https://erigon-lighthouse.mainnet.eu1.ethpandaops.io/}:handler{id=8}: isahc::handler: Connection #0 to host erigon-lighthouse.mainnet.eu1.ethpandaops.io left intact
2024-01-06T15:47:10.290635Z DEBUG history: portal_bridge::bridge::history: Gossip: Block #18949112 Receipts
2024-01-06T15:47:10.321927Z DEBUG history: hyper::client::connect::http: connecting to 127.0.0.1:8545
2024-01-06T15:47:10.322390Z DEBUG history: hyper::client::connect::http: connecting to 127.0.0.1:8545
2024-01-06T15:47:10.322571Z DEBUG history: portal_bridge::gossip: Unable to locate content on network, after failing to gossip, retrying in 15s seconds. content key="0x028ae09f4a4939679fe55e0481dc24fc4a69ca9a87ba8c22dd8fe52b6597949352"

previously it was unclear for example which bridge generated DEBUG: portal_bridge::gossip, but now it is marked DEBUG history: portal_bridge::gossip

This also improves grepibility since you can just grep logs by network which is awesome.

@KolbyML KolbyML self-assigned this Jan 6, 2024
@KolbyML KolbyML marked this pull request as ready for review January 6, 2024 16:02
Copy link
Member

@ogenev ogenev left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Collaborator

@njgheorghita njgheorghita left a comment

Choose a reason for hiding this comment

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

🥳

@KolbyML KolbyML merged commit 6fccde4 into ethereum:master Jan 8, 2024
7 checks passed
@KolbyML KolbyML deleted the mark-bridge-logs branch January 22, 2025 07:53
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