Skip to content

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

@cijothomas

Description

@cijothomas

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions