Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
687829ed
Unverified
Commit
687829ed
authored
Apr 11, 2023
by
mergify[bot]
Committed by
GitHub
Apr 11, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into jm/streamline-migration/non-live-testing
parents
72380064
db7e112a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
tx_metrics.go
op-service/txmgr/metrics/tx_metrics.go
+20
-1
No files found.
op-service/txmgr/metrics/tx_metrics.go
View file @
687829ed
...
...
@@ -19,7 +19,9 @@ type TxMetricer interface {
type
TxMetrics
struct
{
TxL1GasFee
prometheus
.
Gauge
txFees
prometheus
.
Counter
TxGasBump
prometheus
.
Gauge
txFeeHistogram
prometheus
.
Histogram
LatencyConfirmedTx
prometheus
.
Gauge
currentNonce
prometheus
.
Gauge
txPublishError
*
prometheus
.
CounterVec
...
...
@@ -49,6 +51,19 @@ func MakeTxMetrics(ns string, factory metrics.Factory) TxMetrics {
Help
:
"L1 gas fee for transactions in GWEI"
,
Subsystem
:
"txmgr"
,
}),
txFees
:
factory
.
NewCounter
(
prometheus
.
CounterOpts
{
Namespace
:
ns
,
Name
:
"tx_fee_gwei_total"
,
Help
:
"Sum of fees spent for all transactions in GWEI"
,
Subsystem
:
"txmgr"
,
}),
txFeeHistogram
:
factory
.
NewHistogram
(
prometheus
.
HistogramOpts
{
Namespace
:
ns
,
Name
:
"tx_fee_histogram_gwei"
,
Help
:
"Tx Fee in GWEI"
,
Subsystem
:
"txmgr"
,
Buckets
:
[]
float64
{
0.5
,
1
,
2
,
5
,
10
,
20
,
40
,
60
,
80
,
100
,
200
,
400
,
800
,
1600
},
}),
TxGasBump
:
factory
.
NewGauge
(
prometheus
.
GaugeOpts
{
Namespace
:
ns
,
Name
:
"tx_gas_bump"
,
...
...
@@ -90,8 +105,12 @@ func (t *TxMetrics) RecordNonce(nonce uint64) {
// TxConfirmed records lots of information about the confirmed transaction
func
(
t
*
TxMetrics
)
TxConfirmed
(
receipt
*
types
.
Receipt
)
{
fee
:=
float64
(
receipt
.
EffectiveGasPrice
.
Uint64
()
*
receipt
.
GasUsed
/
params
.
GWei
)
t
.
confirmEvent
.
Record
(
receiptStatusString
(
receipt
))
t
.
TxL1GasFee
.
Set
(
float64
(
receipt
.
EffectiveGasPrice
.
Uint64
()
*
receipt
.
GasUsed
/
params
.
GWei
))
t
.
TxL1GasFee
.
Set
(
fee
)
t
.
txFees
.
Add
(
fee
)
t
.
txFeeHistogram
.
Observe
(
fee
)
}
func
(
t
*
TxMetrics
)
RecordGasBumpCount
(
times
int
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment