Skip to content

generic.Counter.With() loses the Name #455

@yurishkuro

Description

@yurishkuro

The With() method returns a new counter with blank name, is that intentional? The behavior was counter-intuitive to me.

// With implements Counter.
func (c *Counter) With(labelValues ...string) metrics.Counter {
	return &Counter{
		bits: atomic.LoadUint64(&c.bits),
		lvs:  c.lvs.With(labelValues...),
	}
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions