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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow MetricFamilyToText to omit Type information if specified #401

Open
conorevans opened this issue Aug 16, 2022 · 1 comment
Open

Allow MetricFamilyToText to omit Type information if specified #401

conorevans opened this issue Aug 16, 2022 · 1 comment

Comments

@conorevans
Copy link

Similar to HELP, it would be nice to have the option to toggle TYPE being included

	// Comments, first HELP, then TYPE.
	if in.Help != nil {
        }

Some context: influxdata/telegraf#11417

Note: I would like to make this contribution 馃檪

@conorevans
Copy link
Author

conorevans commented Aug 16, 2022

Hmm ok, re-reading, MetricFamily.Type cannot legitimately be nil. So far I see a few options (going to try to look for a better one)

  • if in.Help is nil, we can also node show the Type comment... doesn't feel quite right
  • add a func parameter (but it would have to be a bool arg, we couldn't apply an Option func) but this method is exported and that's an annoying change for most downstream users

Each of those definitely requires some sign-off from maintainers (hi @roidelapluie)

E: I couldn't see a nice way to do it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant