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

Validate user provided Histogram bounds at sdk during Instrument creation time #2286

Closed
cijothomas opened this issue Nov 7, 2024 · 0 comments · Fixed by #2351
Closed

Validate user provided Histogram bounds at sdk during Instrument creation time #2286

cijothomas opened this issue Nov 7, 2024 · 0 comments · Fixed by #2351
Assignees
Milestone

Comments

@cijothomas
Copy link
Member

https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-sdk/src/metrics/meter.rs#L385 is only validating name,unit etc. We should validate the buckets at this point, and if validation fails, we should either

  1. Return no-op instrument as do when other validation fails.
  2. Use default bounds, and ignore the user-provided one.

Emit WARN internal log in either case.

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

Successfully merging a pull request may close this issue.

1 participant