Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
yurishkuro opened this issue Feb 9, 2017 · 3 comments
Closed

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

yurishkuro opened this issue Feb 9, 2017 · 3 comments
Assignees

Comments

@yurishkuro
Copy link
Contributor

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...),
	}
}
@groob
Copy link
Contributor

groob commented Feb 9, 2017

Are you passing a name key/value to With or just calling With() with no args?

@yurishkuro
Copy link
Contributor Author

I am calling With() with other tags, which are not part of the metric name but are additional dimensions for aggregations.

@peterbourgon
Copy link
Member

Yep, on first glance this is probably a bug with all 3 generic.Metrics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants