-
Notifications
You must be signed in to change notification settings - Fork 205
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
Do not send metric NaN values #2119
Conversation
@trask can we please add a unit test for this scenario? |
if (filteredPoints.isEmpty()) { | ||
if (metricsData.getMetrics().isEmpty()) { | ||
// this is unexpected | ||
logger.debug("MetricsData has no metric point"); |
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.
should it throw an exception if it's unexpected?
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.
I was being conservative, but feel pretty confident, so bumped it up to an exception
} | ||
|
||
if (!Double.isFinite(point.getValue())) { | ||
// breeze doesn't like these values |
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.
do we drop that data point and then send the rest to breeze? here because of bad NaN we drop the whole metric. i wonder how other sdks handle it.
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.
unless that data point is the key dimension for that metric. it makes sense to drop it. without it metric doesn't make sense.
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.
ya, metric value is required
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.
I wonder how other sdks handle it
https://github.com/microsoft/Telemetry-Collection-Spec/issues/29
can we add a test for NaN MetricDataPoint? |
it's tricky currently b/c |
No description provided.