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

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

Open
raulb opened this issue Jun 30, 2021 · 0 comments
Open

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

raulb opened this issue Jun 30, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@raulb
Copy link
Member

raulb commented Jun 30, 2021

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

@raulb raulb added the enhancement New feature or request label Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant