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

[pdata] Add functions to clear optional fields #6474

Closed
dmitryax opened this issue Nov 3, 2022 · 0 comments · Fixed by #6475
Closed

[pdata] Add functions to clear optional fields #6474

dmitryax opened this issue Nov 3, 2022 · 0 comments · Fixed by #6475
Labels
area:pdata pdata module related issues

Comments

@dmitryax
Copy link
Member

dmitryax commented Nov 3, 2022

There is no pdata API to clear optional fields like pmetric.HistogramDataPoint.Min/Max. We didn't add it before 1.0 because there was no need for that, but apparently it's needed now for open-telemetry/opentelemetry-collector-contrib#15658.

Suggestion is to add methods with Clear prefix like:

  • pmetric.HistogramDataPoint.ClearMin()
  • pmetric.HistogramDataPoint.ClearMax()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:pdata pdata module related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant