Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat: add the UpDownCounter instrument #1120

Merged
merged 6 commits into from
Jun 12, 2020

Conversation

mayurkale22
Copy link
Member

Which problem is this PR solving?

Short description of the changes

  • Added new API endpoint and default SDK implementation.

  • The Counter and SumObserver instruments are defined as monotonic (by default) and UpDown- variations of these two instruments are non-monotonic. So no need to have monotonic flag separately.

  • Updated Prometheus export to export UpDownCounter as Gauge type.

  • I will take care of examples and remaining documentation in subsequent PR.

@codecov
Copy link

codecov bot commented May 28, 2020

Codecov Report

Merging #1120 into master will decrease coverage by 0.05%.
The diff coverage is 88.57%.

@@            Coverage Diff             @@
##           master    #1120      +/-   ##
==========================================
- Coverage   92.39%   92.33%   -0.06%     
==========================================
  Files         118      119       +1     
  Lines        3407     3433      +26     
  Branches      694      696       +2     
==========================================
+ Hits         3148     3170      +22     
- Misses        259      263       +4     
Impacted Files Coverage Δ
packages/opentelemetry-api/src/metrics/Metric.ts 100.00% <ø> (ø)
...ackages/opentelemetry-api/src/metrics/NoopMeter.ts 69.76% <0.00%> (-3.41%) ⬇️
packages/opentelemetry-metrics/src/Metric.ts 100.00% <ø> (ø)
packages/opentelemetry-metrics/src/export/types.ts 100.00% <ø> (ø)
packages/opentelemetry-metrics/src/types.ts 100.00% <ø> (ø)
packages/opentelemetry-metrics/src/Meter.ts 93.65% <77.77%> (-2.65%) ⬇️
...pentelemetry-exporter-prometheus/src/prometheus.ts 91.39% <100.00%> (ø)
...kages/opentelemetry-metrics/src/BoundInstrument.ts 100.00% <100.00%> (ø)
...s/opentelemetry-metrics/src/UpDownCounterMetric.ts 100.00% <100.00%> (ø)
...ckages/opentelemetry-metrics/src/export/Batcher.ts 100.00% <100.00%> (ø)
... and 1 more

@obecny obecny assigned obecny and unassigned obecny Jun 4, 2020
@mayurkale22 mayurkale22 requested a review from naseemkullah as a code owner June 5, 2020 00:42
Copy link
Member

@obecny obecny left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Member

@mwear mwear left a comment

Choose a reason for hiding this comment

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

LGTM

@mayurkale22 mayurkale22 merged commit 469b759 into open-telemetry:master Jun 12, 2020
@mayurkale22 mayurkale22 deleted the UpDownCounter branch June 12, 2020 06:08
dyladan pushed a commit to dyladan/opentelemetry-js that referenced this pull request Sep 9, 2022
dyladan pushed a commit to dyladan/opentelemetry-js that referenced this pull request Sep 9, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement UpDownCounter
5 participants