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

metrics: Remove LabelSet #527

Merged
merged 7 commits into from
Mar 28, 2020
Merged

metrics: Remove LabelSet #527

merged 7 commits into from
Mar 28, 2020

Conversation

mauriciovasquezbernal
Copy link
Member

@mauriciovasquezbernal mauriciovasquezbernal requested a review from a team March 25, 2020 13:22
@codecov-io
Copy link

codecov-io commented Mar 25, 2020

Codecov Report

Merging #527 into master will decrease coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #527      +/-   ##
==========================================
- Coverage   89.56%   89.47%   -0.09%     
==========================================
  Files          43       43              
  Lines        2213     2195      -18     
  Branches      249      247       -2     
==========================================
- Hits         1982     1964      -18     
  Misses        159      159              
  Partials       72       72              
Impacted Files Coverage Δ
...elemetry-api/src/opentelemetry/metrics/__init__.py 92.95% <100.00%> (-0.55%) ⬇️
...etry-sdk/src/opentelemetry/sdk/metrics/__init__.py 94.47% <100.00%> (-0.40%) ⬇️
...k/src/opentelemetry/sdk/metrics/export/__init__.py 100.00% <100.00%> (ø)
...dk/src/opentelemetry/sdk/metrics/export/batcher.py 92.50% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6afcea9...8a67d13. Read the comment docs.

Copy link
Contributor

@ocelotl ocelotl left a comment

Choose a reason for hiding this comment

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

Minor comments 👍

Comment on lines 252 to 253
labels = {"key": "value"}
key_labels = tuple(sorted(labels.items()))
Copy link
Contributor

Choose a reason for hiding this comment

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

These lines can be moved outside of the for loop.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, moved outside.

@c24t c24t added this to the 3/31 Beta milestone Mar 26, 2020
docs/getting-started.rst Outdated Show resolved Hide resolved
@@ -70,13 +70,13 @@
# is essentially metric data that corresponds to a specific set of labels.
# Therefore, getting a bound metric instrument using the same set of labels
# will yield the same bound metric instrument.
bound_requests_counter = requests_counter.bind(label_set)
bound_requests_counter = requests_counter.bind(labels)
bound_requests_counter.add(100)
time.sleep(5)

print("Updating using batch calling convention...")
# You can record metrics in a batch by passing in a labelset and a sequence of
# (metric, value) pairs. The value would be recorded for each metric using the
# specified labelset for each.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# specified labelset for each.
# specified labels for each.

Copy link
Contributor

@lzchen lzchen left a comment

Choose a reason for hiding this comment

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

Minor comments. LGTM!

@toumorokoshi toumorokoshi merged commit 046057d into open-telemetry:master Mar 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

metrics: Remove LabelSet
6 participants