With OpenCensus becoming a default, and since it supports prometheus as well as a few other backends, I think there's no reason from calling the Prometheus client directly in places such as https://github.com/NYTimes/gizmo/blob/master/server/simple_server.go#L103
and https://github.com/NYTimes/gizmo/blob/master/server/simple_server.go#L122
where both function calls are deprecated according to prometheus docs.
Here are a few options:
- Let the user just call
gcputil.RegisterStackDriver() themselves, so they can be free to choose other backends if they need to.
- Let SimpleServer call
gcputil.RegisterStackDriver() internally, but we should probably provide a new server.Config option such as SkipMonitoring or EnableMonitoring depending on the kind of default behavior we want yet still letting the user to be able to opt out of it if they have other needs.
- We can have the user pass in an
opencensus.Exporter interface and just register it with OpenCensus on Init
Personally, I prefer option 3, and 1 the most
With OpenCensus becoming a default, and since it supports prometheus as well as a few other backends, I think there's no reason from calling the Prometheus client directly in places such as https://github.com/NYTimes/gizmo/blob/master/server/simple_server.go#L103
and https://github.com/NYTimes/gizmo/blob/master/server/simple_server.go#L122
where both function calls are deprecated according to prometheus docs.
Here are a few options:
gcputil.RegisterStackDriver()themselves, so they can be free to choose other backends if they need to.gcputil.RegisterStackDriver()internally, but we should probably provide a newserver.Configoption such asSkipMonitoringorEnableMonitoringdepending on the kind of default behavior we want yet still letting the user to be able to opt out of it if they have other needs.opencensus.Exporterinterface and just register it with OpenCensus on InitPersonally, I prefer option 3, and 1 the most