-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[tanzuobservability exporter] Add consumer for sum metrics. #6385
Conversation
return pdata.MetricDataTypeSum | ||
} | ||
|
||
func (s *sumConsumer) Consume(metric pdata.Metric, errs *[]error) { |
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.
The specification gives some indications on how Sums are mapped to a timeseries model (PRW-based), in which monotonic Sums are mapped as counters while non-monotonic sums are mapped as gauges.
What to do here ultimately depends on your timeseries model (which I don't know), so this implementation is not necessarily wrong, but I wanted to bring it up here just in case it helped
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.
Thank you for pointing this out. Tanzu observability has a special API call to send a delta sum metric. To send a cumulative sum metric to wavefront, you use the same API call that you would use to send a gauge metric.
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.
Thank you for pointing this out. Tanzu observability has a special API call to send a delta sum metric. To send a cumulative sum metric to wavefront, you use the same API call that you would use to send a gauge metric.
pushGaugeSingleNumberDataPoint->pushGaugeNumberDataPoint pushSingleNumberDataPoint->pushNumberDataPoint
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 a couple small changes and then I think we're good!
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.
Looks good!
…emetry#6385) * [tanzuobservability exporter] Add consumer for sum metrics. * Function headers to be more readable. pushGaugeSingleNumberDataPoint->pushGaugeNumberDataPoint pushSingleNumberDataPoint->pushNumberDataPoint * Break verifySumConsumer into four separate tests. * Minor changes to tests.
Description:
Add support for sum metrics.
Testing:
Unit tests.