Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion block/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics {
}, labels).With(labelsAndValues...)

// Initialize channel buffer usage gauges
channelNames := []string{"header_in", "data_in", "header_store", "data_store", "retrieve", "da_includer", "tx_notify"}
channelNames := []string{"height_in", "header_store", "data_store", "retrieve", "da_includer", "tx_notify"}
Comment thread
julienrbrt marked this conversation as resolved.
for _, name := range channelNames {
m.ChannelBufferUsage[name] = prometheus.NewGaugeFrom(stdprometheus.GaugeOpts{
Namespace: namespace,
Expand Down
9 changes: 4 additions & 5 deletions block/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ func TestMetrics(t *testing.T) {
assert.NotNil(t, em.NumTxs)

// Test channel metrics initialization
assert.Len(t, em.ChannelBufferUsage, 7)
assert.NotNil(t, em.ChannelBufferUsage["header_in"])
assert.NotNil(t, em.ChannelBufferUsage["data_in"])
assert.Len(t, em.ChannelBufferUsage, 6)
assert.NotNil(t, em.ChannelBufferUsage["height_in"])
assert.NotNil(t, em.DroppedSignals)

// Test error metrics initialization
Expand Down Expand Up @@ -75,6 +74,7 @@ func TestMetrics(t *testing.T) {

// Test maps are initialized
assert.Len(t, em.ChannelBufferUsage, 6)
assert.NotNil(t, em.ChannelBufferUsage["height_in"])
assert.Len(t, em.ErrorsByType, 5)
assert.Len(t, em.OperationDuration, 5)
assert.Len(t, em.StateTransitions, 3)
Expand Down Expand Up @@ -176,8 +176,7 @@ func TestMetricsIntegration(t *testing.T) {
em.GoroutineCount.Set(50)

// Test channel metrics
em.ChannelBufferUsage["header_in"].Set(5)
em.ChannelBufferUsage["data_in"].Set(3)
em.ChannelBufferUsage["height_in"].Set(5)

// Test error metrics
em.ErrorsByType["block_production"].Add(1)
Expand Down
Loading