motiv-labs / janus

An API Gateway written in Go
https://hellofresh.gitbooks.io/janus
MIT License
2.78k stars 317 forks source link

Prometheus Support #299

Open italolelis opened 6 years ago

italolelis commented 6 years ago

We need to add Prometheus Support, not as a plugin but as part of the core architecture of Janus. Ideally, we should have a way to choose which instrumentation we want to use (statsd, prometheus, etc). This means we have to encapsulate our current statsd implementation into something that can be replaced by other implementations.

rafaeljesus commented 6 years ago

We can start https://github.com/hellofresh/stats-go was just merged over this week

DineshReddyK commented 5 years ago

Latest stats-go is already supporting "prometheus" as the backend. when I try to use the latest stats-go with "janus" compilation issues are observed.

Is there any plan to support stats-go 1.0.0 with janus ?

pkg/proxy/reverse_proxy.go:109:63: cannot use bucket.MetricOperation literal (type bucket.MetricOperation) as type *bucket.MetricOperation in argument to statsClient.TrackMetric
pkg/proxy/reverse_proxy.go:109:67: cannot use req.Host (type string) as type sync.Mutex in field value
pkg/proxy/reverse_proxy.go:109:67: too few values in struct initializer
adlecluse commented 5 years ago

Latest stats-go is already supporting "prometheus" as the backend. when I try to use the latest stats-go with "janus" compilation issues are observed.

Is there any plan to support stats-go 1.0.0 with janus ?

pkg/proxy/reverse_proxy.go:109:63: cannot use bucket.MetricOperation literal (type bucket.MetricOperation) as type *bucket.MetricOperation in argument to statsClient.TrackMetric
pkg/proxy/reverse_proxy.go:109:67: cannot use req.Host (type string) as type sync.Mutex in field value
pkg/proxy/reverse_proxy.go:109:67: too few values in struct initializer

Having the same issue, any ideas how to fix that?

samerbahri98 commented 3 months ago

is this issue still relevant?