Skip to content
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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jmichalek132
Copy link
Contributor

@jmichalek132 jmichalek132 commented Nov 13, 2024

Description

prometheus translation rw2 add support for MetricTypeSum

TODO:

  • Unit tests
  • Changelog entry

Link to tracking issue #33661

Fixes

Testing

Documentation

// TODO implement
dataPoints := metric.Sum().DataPoints()
if dataPoints.Len() == 0 {
errs = multierr.Append(errs, fmt.Errorf("empty data points. %s is dropped", metric.Name()))
Copy link
Contributor

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
Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Dec 11, 2024
@dashpole dashpole removed the Stale label Dec 11, 2024
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Dec 26, 2024
@dashpole dashpole removed the Stale label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants