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

Spigo won't build due to go-kit/metrics refactor (was: go run spigo.go) #78

Open
cmartin0077 opened this issue Sep 11, 2016 · 2 comments

Comments

@cmartin0077
Copy link

Looks like go-kit/kit changed and I am getting errors when starting spigo?

go run spigo.go
# github.com/adrianco/spigo/tooling/collect
tooling/collect/collect.go:32: too many arguments in call to "github.com/go-kit/kit/metrics/expvar".NewHistogram
tooling/collect/collect.go:48: cannot use int64(maxHistObservable) (type int64) as type float64 in argument to h.Observe
tooling/collect/collect.go:50: cannot use int64(d) (type int64) as type float64 in argument to h.Observe
tooling/collect/collect.go:68: undefined: metrics.PrintDistribution
tooling/collect/collect.go:98: h.Name undefined (type metrics.Histogram has no field or method Name)

Maybe I am doing something wrong ?

@adrianco
Copy link
Owner

Not your fault - the metrics package was refactored and I have to update to the new APIs.

Details:
https://twitter.com/peterbourgon/status/776166680502362112

@adrianco
Copy link
Owner

This pull request changed things: go-kit/kit#313

Major and/or breaking changes:

The metric interfaces are reduced to only what is necessary to make observations.
metrics.Field is removed. Use ordered string pairs, like package log, instead.
All metric values are float64. Thanks, Prometheus, for the inspiration.
TimeHistogram is removed. Prefer observing float64 seconds instead.
NewMulti{Histogram,Counter,Gauge} are moved to sub-package multi.
Minor changes:

PrintHistogram is removed. Users can use generic.Histogram.Print instead.
Distribution method is removed. Users can use generic.Histogram.Quantile instead.
Metrics systems that have similar emission semantics share similar architectures.
Metrics systems that support arbitrary label values share a basic implementation, lv.Space.
prometheus.RegisterCallbackGauge is gone. Use standard Prometheus NewGaugeFunc instead.

@adrianco adrianco changed the title go run spigo.go Spigo won't build due to go-kit/metrics refactor (was: go run spigo.go) Sep 19, 2016
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

2 participants