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

Fix incorrect aggregation; Prometheus exporter behavior #903

Merged
merged 15 commits into from
Jul 7, 2020

Conversation

jmacd
Copy link
Contributor

@jmacd jmacd commented Jul 6, 2020

There was a bug in FinishCollection() that would double-apply stale updates for instruments that had not been modified in the most recent collection interval. This corrects the incorrect aggregation.

This adds further correctness and testing for Prometheus. The basic processor supports a new Memory option that says whether to remember and report metric instruments and label sets that were not modified in the most recent collection interval. The TestProcessor test is refactored to reduce indentation level. New tests are added for the delta and cumulative case, where a stateful aggregator may be called for and the no-memory configuration still suppresses reporting for unmodified data.

Resolves #887.

example/prometheus/main.go Show resolved Hide resolved
exporters/metric/prometheus/prometheus_test.go Outdated Show resolved Hide resolved
sdk/metric/processor/basic/basic.go Show resolved Hide resolved
Copy link
Member

@lizthegrey lizthegrey left a comment

Choose a reason for hiding this comment

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

please make sure you note the bug fix in the CHANGELOG.

@jmacd
Copy link
Contributor Author

jmacd commented Jul 6, 2020

Done

sdk/metric/processor/basic/config.go Outdated Show resolved Hide resolved
@jmacd jmacd merged commit 3475d55 into open-telemetry:master Jul 7, 2020
@jmacd jmacd deleted the jmacd/otlp_debug branch July 7, 2020 19:52
@MrAlias MrAlias mentioned this pull request Jul 9, 2020
@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.

Prometheus Exporter Example
5 participants