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

[EXPORTER] set is_monotonic only for instrument type kCounter #2171

Merged
merged 2 commits into from
Jun 3, 2023

Conversation

jaelrod
Copy link
Contributor

@jaelrod jaelrod commented Jun 1, 2023

Fixes #2170
Metrics that are inherently non-monotonic nature are exported by OTLP exporter with IsMonotonic set to true.

Changes

Updates the OTLP exporter to set IsMonotonic to true only when the instrument type in use is kCounter and otherwise false.

  • Unit tests have been added

@jaelrod jaelrod requested a review from a team June 1, 2023 18:20
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 1, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Merging #2171 (9b00502) into main (f5fd906) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2171   +/-   ##
=======================================
  Coverage   87.48%   87.48%           
=======================================
  Files         168      168           
  Lines        4869     4869           
=======================================
  Hits         4259     4259           
  Misses        610      610           

@marcalff marcalff changed the title set is_monotonic only for instrument type kCounter [EXPORTER] set is_monotonic only for instrument type kCounter Jun 1, 2023
@lalitb
Copy link
Member

lalitb commented Jun 1, 2023

Thanks for the contribution. The fix looks good to merge once unit-test are fixed (as suggested in comment) to make CI pass.

@lalitb lalitb added the ok-to-merge The PR is ok to merge (has two approves or raised by a maintainer/approver and has one approve) label Jun 3, 2023
Copy link
Member

@esigo esigo left a comment

Choose a reason for hiding this comment

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

LGTM
Thanks :)

@esigo esigo merged commit 41416ce into open-telemetry:main Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-merge The PR is ok to merge (has two approves or raised by a maintainer/approver and has one approve)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OTLP Exporter Exports UpDownCounter Instrument as Monotonic
3 participants