-
Notifications
You must be signed in to change notification settings - Fork 9
Add Prometheus metrics for AltDA failover in Batcher #361
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
Conversation
|
@jcortejoso @alvarof2 @gastonponti Any metrics besides those implemented that would be helpful for you? |
ezdac
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
I would record the batch-send success at a different location (see comment).
In terms of additional metrics,
maybe the actual number of bytes sent to the DA-proxy would be interesting,
so the cumulative sum of the http-body size in the setInput and setInputWithCommit, but only if the proxy returns a 200.
op-batcher/batcher/driver.go
Outdated
| } | ||
| // if Alt DA is enabled we post the txdata to the DA Provider and replace it with the commitment. | ||
| l.publishToAltDAAndL1(txdata, queue, receiptsCh, daGroup) | ||
| l.Metr.RecordBatchDaType(txdata.daType.Name()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the publishToAltDAAndL1() spawns a goroutine that in turn calls the sendTx, but only if the AltDA input can be set correctly.
If you call this here, you get a "confirmation" for sending the tx, even though you could have aborted before the send and recorded a "failedDARequest".
I think I would only add one Metr.RecordBatchDaType call in general and rather do that at the end of the sendTx(), but only if the passed in isCancel==false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ezdac You're right. For Alt DA, it recorded regardless of success or failure. Then I updated codes and now it records when handleReceipt is called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now!
The only thing I'm not 100% happy about is the semantic discrepancy of "sent bytes" for AltDA and for non-AltDA. For the former, it means how much has been successfully sent to the AltDA layer but not landed onchain, for the latter it means how much successfully made it onchain.
|
Looks good to me to 👍 |
|
@ezdac Hi, I unified recordings of stored batch size. Now total frame sizes are recorded after tx is confirmed in L1 regardless of DA type. |
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* feat: add re emit sent msg event logic on l2 to l2 cdm * feat: add tests for the re emit feature * fix: review comments chore: run pre pr * refactor: rename to resend msg * chore: return msg hash (#361) --------- Co-authored-by: 0xDiscotech <[email protected]>
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
* Add Prometheus metrics for AltDA failover in Batcher * Fix calls of RecordBatchDaType * Revert deleted comment * Add metrics for total stored batch size * Fix condition for RecordBatchDaType and RecordBatchDataSizeBytes * Add missing namespace to prometheus definition * Fix the amount of batch sizes recorded for DA * Unify recordings of size of batch to be stored * Improve Prometheus help text
Closes #321
Add the following types of metrics for AltDA failover feature