Commit ed7003d
feat(proxyd): log sendRawTransaction forwarding with tx_hash and duration (#569)
* feat(proxyd): log sendRawTransaction forwarding with tx_hash and duration
When enable_tx_hash_logging is enabled, proxyd now emits a
"sendRawTransaction forwarded" log after the backend responds. This
correlates req_id with tx_hash and includes backend name, backend group,
and forwarding duration in milliseconds.
This complements the existing "processing sendRawTransaction" log (which
fires at request time) by adding a response-time log that measures
proxyd's internal processing time — useful for flashblocks latency
analysis with op-benchmark.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test(proxyd): verify forwarding log fields match request log
Parse the JSON log lines to assert that the "sendRawTransaction
forwarded" log has the correct tx_hash value and that its req_id matches
the corresponding "processing sendRawTransaction" log from the same
request.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(proxyd): only log sendRawTransaction forwarded on success
Move the forwarding log after the error handling block so it only emits
when Forward() succeeds. Previously it fired before the err check,
producing misleading latency data on failed forwards.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 10ba4dd commit ed7003d
2 files changed
+54
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
15 | 37 | | |
16 | 38 | | |
17 | 39 | | |
| |||
49 | 71 | | |
50 | 72 | | |
51 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
52 | 85 | | |
53 | 86 | | |
54 | 87 | | |
| |||
121 | 154 | | |
122 | 155 | | |
123 | 156 | | |
| 157 | + | |
124 | 158 | | |
125 | 159 | | |
126 | 160 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
568 | 568 | | |
569 | 569 | | |
570 | 570 | | |
| 571 | + | |
571 | 572 | | |
572 | 573 | | |
573 | 574 | | |
| |||
653 | 654 | | |
654 | 655 | | |
655 | 656 | | |
| 657 | + | |
656 | 658 | | |
657 | 659 | | |
658 | 660 | | |
| |||
713 | 715 | | |
714 | 716 | | |
715 | 717 | | |
| 718 | + | |
716 | 719 | | |
| 720 | + | |
717 | 721 | | |
| 722 | + | |
718 | 723 | | |
719 | 724 | | |
720 | 725 | | |
| |||
733 | 738 | | |
734 | 739 | | |
735 | 740 | | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
736 | 756 | | |
737 | 757 | | |
738 | 758 | | |
| |||
0 commit comments