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
[pdatagen] Generate Metric type accessors #4811
[pdatagen] Generate Metric type accessors #4811
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4811 +/- ##
=======================================
Coverage 90.76% 90.76%
=======================================
Files 180 180
Lines 10590 10590
=======================================
Hits 9612 9612
Misses 761 761
Partials 217 217
Continue to review full report at Codecov.
|
@@ -1106,6 +1124,18 @@ func (ms NumberDataPoint) SetTimestamp(v Timestamp) { | |||
(*ms.orig).TimeUnixNano = uint64(v) | |||
} | |||
|
|||
// Type returns the type of the value for this NumberDataPoint. | |||
// Calling this function on zero-initialized NumberDataPoint will cause a panic. | |||
func (ms NumberDataPoint) Type() MetricValueType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the list of "may fix": MetricValueType does not sound as the best name for the enum. Maybe NumberValueType?
PointValueType? Not sure, just open an issue, this name does not sound very clear to me, because I would ask why Histogram is not a value type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense. Filed an issue #4819
Resolves #4782