forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 0
Create a log module #391
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
Merged
Merged
Create a log module #391
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| // Package logmodule defines log message string constants for the Espresso integration. | ||
| // | ||
| // dashboard_keys.go contains constants for events monitored by the DataDog dashboard. | ||
| // These must be kept in sync with any dashboard queries, alerts, or deployment investigation | ||
| // runbooks that reference them by name. If you change any of these strings, update the | ||
| // DataDog dashboard queries and alerts at the same time. | ||
| package logmodule | ||
|
|
||
| const ( | ||
| // SequencerSealedBlock is emitted by the sequencer each time it seals a new L2 block. | ||
| // Monitored as the primary "blocks produced" metric. | ||
| SequencerSealedBlock = "Sequencer sealed block" | ||
|
|
||
| // CrossSafeHeadUpdated is emitted by the op-node status tracker each time the cross-safe L2 | ||
| // head advances. Monitored as "new L2 safe blocks" for both the Caff and non-Caff validator nodes. | ||
| CrossSafeHeadUpdated = "Cross safe head updated" | ||
|
|
||
| // TransactionConfirmedOnEspresso is emitted by the batcher after it verifies that a transaction | ||
| // was included in HotShot consensus. | ||
| TransactionConfirmedOnEspresso = "Transaction confirmed on Espresso" | ||
|
|
||
| // TransactionSuccessfullyPublished is emitted by the tx manager after a transaction is accepted | ||
| // by the L1 RPC. Monitored as "L1 batch submissions". | ||
| TransactionSuccessfullyPublished = "Transaction successfully published" | ||
|
|
||
| // SubmittedTransactionToEspresso is emitted by the batcher each time it sends a transaction to | ||
| // the Espresso sequencer. Monitored as "Espresso batch submissions". | ||
| SubmittedTransactionToEspresso = "Submitted transaction to Espresso" | ||
|
|
||
| // ChannelClosed is emitted by the batcher channel manager when a channel is closed and ready | ||
| // for frame submission. | ||
| ChannelClosed = "Channel closed" | ||
|
|
||
| // ReceivedBlockFromEspresso is emitted by the batcher each time it reads a confirmed L2 block | ||
| // back from the Espresso query service. | ||
| ReceivedBlockFromEspresso = "Received block from Espresso" | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| package logmodule | ||
|
|
||
| // Non-dashboard log constants for events referenced in metrics.md that are useful for | ||
| // debugging but are not directly monitored by the DataDog dashboard. | ||
|
|
||
| const ( | ||
| // Batcher | ||
|
|
||
| // AddedL2BlockToChannelManager is emitted each time a new L2 block is enqueued for batching. | ||
| AddedL2BlockToChannelManager = "Added L2 block to channel manager" | ||
|
|
||
| // ClearingState is emitted on a batcher state reset. Even a single occurrence is suspicious. | ||
| ClearingState = "Clearing state" | ||
|
|
||
| // FailedToDeriveBatchFromBlock is emitted when the batcher cannot construct an Espresso transaction from an L2 block. | ||
| FailedToDeriveBatchFromBlock = "Failed to derive batch from block" | ||
|
|
||
| // TransactionFailedToSend is emitted when an L1 submission attempt fails. | ||
| TransactionFailedToSend = "Transaction failed to send" | ||
|
|
||
| // DARequestFailed is emitted when an AltDA submission fails. | ||
| DARequestFailed = "DA request failed" | ||
|
|
||
| // FoundL2Reorg is emitted when the batcher detects an L2 reorg. | ||
| FoundL2Reorg = "Found L2 reorg" | ||
|
|
||
| // Node (Caff, Non-caff, Sequencer) | ||
|
|
||
| // NewL1SafeBlock is emitted each time a new L1 safe block is observed. | ||
| NewL1SafeBlock = "New L1 safe block" | ||
|
|
||
| // InsertedNewL2UnsafeBlock is emitted each time a new L2 unsafe block is inserted. | ||
| InsertedNewL2UnsafeBlock = "Inserted new L2 unsafe block" | ||
|
|
||
| // HitFinalizedL2Head is emitted during a sync reset when the node reaches the finalized L2 head. | ||
| // An increasing L2 safe number here serves as an alternative indicator for "new L2 safe blocks" | ||
| // after a pipeline reset (non-Caff validator node only). | ||
| HitFinalizedL2Head = "Hit finalized L2 head, returning immediately" | ||
|
|
||
| // DerivationProcessError is emitted on a recoverable derivation pipeline error. | ||
| DerivationProcessError = "Derivation process error" | ||
|
|
||
| // DroppingBatch is emitted when a malformed or invalid batch is discarded. | ||
| DroppingBatch = "Dropping batch" | ||
|
|
||
| // FailedToParseFrames is emitted when frame parsing fails for a batch. | ||
| FailedToParseFrames = "Failed to parse frames" | ||
|
|
||
| // Sequencer | ||
|
|
||
| // EngineFailedTemporarily is emitted when the execution engine fails and the sequencer backs off. | ||
| EngineFailedTemporarily = "Engine failed temporarily, backing off sequencer" | ||
|
|
||
| // EngineResetConfirmed is emitted after a successful engine reset, allowing the sequencer to resume. | ||
| EngineResetConfirmed = "Engine reset confirmed, sequencer may continue" | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.