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

[cmd/mdatagen] Provide config with all metrics disabled #30993

Closed
braydonk opened this issue Feb 1, 2024 · 5 comments
Closed

[cmd/mdatagen] Provide config with all metrics disabled #30993

braydonk opened this issue Feb 1, 2024 · 5 comments
Labels
cmd/mdatagen mdatagen command enhancement New feature or request Stale

Comments

@braydonk
Copy link
Contributor

braydonk commented Feb 1, 2024

Component(s)

cmd/mdatagen

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

There are some scenarios where it would be nice to easily receive a metric builder config with all metrics disabled. (Example scenario in Additional Context)

Describe the solution you'd like

I would like to add a new function called DefaultMetricsConfigAllDisabled (or something to that effect) to the generation template that will provide a metric builder config with all metrics disabled.

Describe alternatives you've considered

Currently the only way to do this is to get a default config and manually set all the metrics enabled fields to false, or to use reflection.

Additional context

I encountered a scenario in #30894 where this would have been useful. I would have liked to be able to provide a test where only 2 of the metrics in the config were enabled, but it would have been very repetitive to write disabling every other metric. This also applies to how I would have liked to provide fields on the processscraper config that might enable/disable groups of metrics for convenience.

@braydonk braydonk added enhancement New feature or request needs triage New item requiring triage labels Feb 1, 2024
@github-actions github-actions bot added the cmd/mdatagen mdatagen command label Feb 1, 2024
Copy link
Contributor

github-actions bot commented Feb 1, 2024

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@braydonk
Copy link
Contributor Author

braydonk commented Feb 1, 2024

I know this is moving to collector core soon, but I opted to open the issue and PR here for now and will move it over if/when needed.

@crobert-1
Copy link
Member

Sounds good to me, removing needs triage.

@crobert-1 crobert-1 removed the needs triage New item requiring triage label Feb 1, 2024
Copy link
Contributor

github-actions bot commented Apr 2, 2024

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

@github-actions github-actions bot added the Stale label Apr 2, 2024
@braydonk
Copy link
Contributor Author

braydonk commented Apr 2, 2024

Closing in favour of open-telemetry/opentelemetry-collector#10074

@braydonk braydonk closed this as completed Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/mdatagen mdatagen command enhancement New feature or request Stale
Projects
None yet
Development

No branches or pull requests

2 participants