Skip to content

Replace ErrNoLastValue and ErrEmptyDataSet by ErrNoData #557

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

Merged
merged 1 commit into from
Mar 16, 2020

Conversation

evantorrie
Copy link
Contributor

Per this comment in issue #346, this PR replaces ErrNoLastValue and ErrEmptyDataSet by a single ErrNoData.

The checkpoint ForEach() interface is changed to both take a function which returns an error, and to return an error itself. ErrNoData is treated silently by ForEach(), whereas other errors are immediately returned to the caller.

Note that ErrNonMonotoneInput is currently unused by the current aggregators and is removed (it may need to make a reappearance).

@rghetia
Copy link
Contributor

rghetia commented Mar 16, 2020

closing and reopening to trigger the build.

@rghetia rghetia closed this Mar 16, 2020
@rghetia rghetia reopened this Mar 16, 2020
Copy link
Contributor

@jmacd jmacd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

It looks like the Prometheus and OTLP exporters do not check the errors from ForEach. Would you mind filing issues about that?

@evantorrie
Copy link
Contributor Author

Issues added: #562 and #563

@jmacd
Copy link
Contributor

jmacd commented Mar 17, 2020

Bam! Thank you @evantorrie!

@evantorrie evantorrie deleted the errnodata branch March 17, 2020 23:41
oncilla added a commit to oncilla/opentelemetry-go that referenced this pull request Apr 6, 2020
This PR modifies prometheus.Collect to reflect the change introduced
by open-telemetry#557.

The `export{Counter,Histogram,LastValue,Summary}` methods now all return
an error instead of calling the error callback directly.
The callback is now only called on the returned error from `ForEach`.

fixes open-telemetry#563
rghetia added a commit that referenced this pull request Apr 7, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
This PR modifies prometheus.Collect to reflect the change introduced
by #557.

The `export{Counter,Histogram,LastValue,Summary}` methods now all return
an error instead of calling the error callback directly.
The callback is now only called on the returned error from `ForEach`.

fixes #563

Co-authored-by: Rahul Patel <rahulpa@google.com>
@pellared pellared added this to the untracked milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants