-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: prometheus translation rw2 add support for MetricTypeSum #36353
base: main
Are you sure you want to change the base?
feat: prometheus translation rw2 add support for MetricTypeSum #36353
Conversation
// TODO implement | ||
dataPoints := metric.Sum().DataPoints() | ||
if dataPoints.Len() == 0 { | ||
errs = multierr.Append(errs, fmt.Errorf("empty data points. %s is dropped", metric.Name())) |
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.
does this need to be returned as an error? Can we just ignore these points instead? addSumNumberDataPoints
won't do anything if there are no datapoints
if metric.Sum().IsMonotonic() { | ||
startTimestamp := pt.StartTimestamp() | ||
if startTimestamp == 0 { | ||
return |
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.
Does this mean the exporter won't be useable with the Prometheus receiver? Often, the prometheus receiver won't have a start timestamp set. Is the created timestamp a strict requirement?
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 created timestamp field is required in the message definition but logically optional as the zero value is acceptable.
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Description
prometheus translation rw2 add support for MetricTypeSum
TODO:
Link to tracking issue #33661
Fixes
Testing
Documentation