Skip to content

Remove Deprecated Prometheus - Use OpenCensus Instead #194

Description

@marwan-at-work

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:

  1. Let the user just call gcputil.RegisterStackDriver() themselves, so they can be free to choose other backends if they need to.
  2. 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.
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions