-
Notifications
You must be signed in to change notification settings - Fork 773
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
Metric console exporter modified to deal with all known types #2087
Metric console exporter modified to deal with all known types #2087
Conversation
string valueDisplay = string.Empty; | ||
if (metric is ISumMetric sumMetric) | ||
{ | ||
if (sumMetric.Sum is double doubleSum) |
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 need these if-else conditions or we simply call ToString for whatever point types?
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.
just to demonstrate that the sum is available as double, if the exporter's backend wants it as double.
(yes in this console, i could just ToString() 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.
Roger that.
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.
LGTM with minor suggestions.
Codecov Report
@@ Coverage Diff @@
## metrics #2087 +/- ##
==========================================
Coverage ? 82.45%
==========================================
Files ? 214
Lines ? 6790
Branches ? 0
==========================================
Hits ? 5599
Misses ? 1191
Partials ? 0
|
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.
LGTM
Modifying ConsoleMetricExporter to explore and demo how an actual Exporter would look like.
(will modify both inmemory and console exporters existing today to support metrics as well, once the exporter interfaces are ready)