statediff: Metrics for latest block #44

Merged
telackey merged 2 commits from statediff-metrics-latestblock into v1.9.24-statediff 2020-11-25 10:29:34 +00:00
Member

Adds metrics (in statediff/ namespace) for:

  • latest block sync events
  • completed (written) statediffs
  • length of event channel buffers.

To do:

  • last block synced on blockchain - using chain/head/block

Addresses https://github.com/vulcanize/supernode_ops/issues/24.

Adds metrics (in `statediff/` namespace) for: * latest block sync events * completed (written) statediffs * length of event channel buffers. To do: - [x] <strike>last block synced on blockchain</strike> - using `chain/head/block` Addresses https://github.com/vulcanize/supernode_ops/issues/24.
i-norden reviewed 2020-11-24 07:39:24 +00:00
Member

Yeah I think "statediff" would be more appropriate here

Yeah I think "statediff" would be more appropriate here
Member

Not sure what this would be since the namespace is already "statediff", maybe "service" since the type these metrics are coming from within is the service?

Not sure what this would be since the namespace is already "statediff", maybe "service" since the type these metrics are coming from within is the [service](https://github.com/vulcanize/go-ethereum/blob/v1.9.24-statediff/statediff/service.go#L93)?
@ -0,0 +45,4 @@
writeLoopChannelLen: metrics.NewGauge(),
}
subsys := "service"
reg.Register(metricName(subsys, "last_sync_height"), ctx.lastSyncHeight)
Member

Looks like lastSyncHeight still needs to be updated somewhere (from within core.BlockChain).

Looks like `lastSyncHeight` still needs to be updated somewhere (from within core.BlockChain).
i-norden reviewed 2020-11-24 08:13:50 +00:00
@ -0,0 +45,4 @@
writeLoopChannelLen: metrics.NewGauge(),
}
subsys := "service"
reg.Register(metricName(subsys, "last_sync_height"), ctx.lastSyncHeight)
Member

Doh yeah you mention that in the OP

Doh yeah you mention that in the OP
Member

LGTM once that last metric is filled in

LGTM once that last metric is filled in
roysc reviewed 2020-11-24 11:23:10 +00:00
@ -0,0 +45,4 @@
writeLoopChannelLen: metrics.NewGauge(),
}
subsys := "service"
reg.Register(metricName(subsys, "last_sync_height"), ctx.lastSyncHeight)
Author
Member

Yeah, the chain/head/block metric seems to be what we want - at least, looking at the blockchain code I don't really see a more appropriate location to track head.

Yeah, the chain/head/block metric seems to be what we want - at least, looking at the blockchain code I don't really see a more appropriate location to track head.
roysc reviewed 2020-11-24 11:24:28 +00:00
Author
Member

I pushed an update to name these under statediff/service/, and rename the indexer ones to statediff/indexer

I pushed an update to name these under `statediff/service/`, and rename the indexer ones to `statediff/indexer`
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cerc-io/go-ethereum#44
No description provided.