@@ -94,7 +94,7 @@ func NewMonitor(ctx context.Context, log log.Logger, m metrics.Factory, cfg CLIC
94
94
Namespace : MetricsNamespace ,
95
95
Name : "eventEmitted" ,
96
96
Help : "Event monitored emitted an log" ,
97
- }, []string {"nickname" , "rulename" , "priority" , "functionName" , "topics" , "address" , "blockNumber" , "txHash" }),
97
+ }, []string {"nickname" , "rulename" , "priority" , "functionName" , "topics" , "address" }),
98
98
unexpectedRpcErrors : m .NewCounterVec (prometheus.CounterOpts {
99
99
Namespace : MetricsNamespace ,
100
100
Name : "unexpectedRpcErrors" ,
@@ -155,13 +155,13 @@ func metricsAllEventsRegistered(globalconfig GlobalConfiguration, eventEmitted *
155
155
for _ , config := range globalconfig .Configuration {
156
156
if len (config .Addresses ) == 0 {
157
157
for _ , event := range config .Events {
158
- eventEmitted .WithLabelValues (nickname , config .Name , config .Priority , event .Signature , event .Keccak256_Signature .Hex (), "ANY_ADDRESSES_[]" , "0" , "N/A" ).Add (0 )
158
+ eventEmitted .WithLabelValues (nickname , config .Name , config .Priority , event .Signature , event .Keccak256_Signature .Hex (), "ANY_ADDRESSES_[]" ).Add (0 )
159
159
}
160
160
continue //pass to the next config so the [] any are not displayed as metrics here.
161
161
}
162
162
for _ , address := range config .Addresses {
163
163
for _ , event := range globalconfig .ReturnEventsMonitoredForAnAddressFromAConfig (address , config ) {
164
- eventEmitted .WithLabelValues (nickname , config .Name , config .Priority , event .Signature , event .Keccak256_Signature .Hex (), address .String (), "0" , "N/A" ).Add (0 )
164
+ eventEmitted .WithLabelValues (nickname , config .Name , config .Priority , event .Signature , event .Keccak256_Signature .Hex (), address .String ()).Add (0 )
165
165
}
166
166
}
167
167
}
@@ -209,10 +209,10 @@ func (m *Monitor) checkEvents(ctx context.Context) { //TODO: Ensure the logs cri
209
209
}
210
210
// We matched an alert!
211
211
event_config := ReturnAndEventForAnTopic (vLog .Topics [0 ], config )
212
- m .log .Info ("Event Detected" , "TxHash" , vLog .TxHash .String (), "Address" , vLog .Address , "Topics" , vLog .Topics , "Config" , config , "event_config.Signature" , event_config .Signature , "event_config.Keccak256_Signature" , event_config .Keccak256_Signature .Hex ())
212
+ m .log .Info ("Event Detected" , "TxHash" , vLog .TxHash .String (), "Address" , vLog .Address , "RuleName" , config . Name , "CurrentBlock" , latestBlockNumber . String (), " Topics" , vLog .Topics , "Config" , config , "event_config.Signature" , event_config .Signature , "event_config.Keccak256_Signature" , event_config .Keccak256_Signature .Hex ())
213
213
// m.eventEmitted.WithLabelValues(m.nickname, config.Name, config.Priority, event_config.Signature, event_config.Keccak256_Signature.Hex(), vLog.Address.String(), latestBlockNumber.String(), vLog.TxHash.String()).Set(float64(1)) //inc
214
214
215
- m .eventEmitted .WithLabelValues (m .nickname , config .Name , config .Priority , event_config .Signature , event_config .Keccak256_Signature .Hex (), vLog .Address .String (), latestBlockNumber . String (), vLog . TxHash . String () ).Inc ()
215
+ m .eventEmitted .WithLabelValues (m .nickname , config .Name , config .Priority , event_config .Signature , event_config .Keccak256_Signature .Hex (), vLog .Address .String ()).Inc ()
216
216
}
217
217
}
218
218
}
0 commit comments