Skip to content

Use go build tags to enable/disable metrics publication #159

Open

Description

@raulb

Is your feature request related to a problem? Please describe.

With the use of go build tags, we could build with metrics only when distributing the CLI via our release process.

Describe the solution you'd like

  1. Have a build tag such as // +build metrics in those parts where we emit metrics.
  2. Update goreleaser.yml to use this flag.
  3. Consider removing the option to silence metrics via PUBLISH_METRICS=false

Describe alternatives you've considered

Leave implementation as is.

Additional context

This article explains very well how to make use of these build tags: https://www.digitalocean.com/community/tutorials/customizing-go-binaries-with-build-tags

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions