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

Check for coverage of all metric types #7532

Closed
Tracked by #9109
Aneurysm9 opened this issue Feb 2, 2022 · 8 comments · Fixed by #23242
Closed
Tracked by #9109

Check for coverage of all metric types #7532

Aneurysm9 opened this issue Feb 2, 2022 · 8 comments · Fixed by #23242
Assignees
Labels
good first issue Good for newcomers

Comments

@Aneurysm9
Copy link
Member

Some functions and processors that operate on metrics may not correctly operate on all metric types. We have observed at least the resourcetotelemetry helper not accounting for Summary and Exponential Histogram metrics. A survey should be undertaken to check for similar failures.

Is there any linter that we can enable to check this? I know is hard since there is no enum type, but maybe some structure tags can help. This needs to be investigated because I bet there are more places like this.

Originally posted by @bogdandrutu in #7523 (comment)

@mx-psi
Copy link
Member

mx-psi commented Feb 3, 2022

The exhaustive linter from golangci-lint seems to be able to do this: https://github.com/nishanths/exhaustive

@mx-psi mx-psi added the good first issue Good for newcomers label Mar 18, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2022

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 Nov 8, 2022
@mx-psi mx-psi removed the Stale label Nov 8, 2022
@fatsheep9146 fatsheep9146 self-assigned this Nov 8, 2022
@mattsains
Copy link
Contributor

There are quite a lot of cases where MetricTypeEmpty is not handled by switch statements. eg: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/attributesprocessor/attributes_metric.go#L73

So we'd need to update all of that code to have a case for Empty / have a default clause but I don't know the code well enough to understand what should be done in those cases.

@github-actions
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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.

Pinging code owners:

  • issue: Github issue template generation code needs this to generate the corresponding labels.

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

@fatsheep9146
Copy link
Contributor

close by #9109

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