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
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
further updates
  • Loading branch information
mauriciovasquezbernal committed Mar 27, 2020
commit 35c04d09f63a257d82b22fbf33bfa32b9ede9940
2 changes: 1 addition & 1 deletion docs/examples/basic_meter/calling_conventions.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

print("Updating using a bound instrument...")
# You can record metrics with bound metric instruments. Bound metric
# instruments are created by passing in a labelset. A bound metric instrument
# instruments are created by passing in labels. A bound metric instrument
# is essentially metric data that corresponds to a specific set of labels.
mauriciovasquezbernal marked this conversation as resolved.
Show resolved Hide resolved
# Therefore, getting a bound metric instrument using the same set of labels
# will yield the same bound metric instrument.
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-sdk/tests/metrics/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,10 @@ class TestMetric(unittest.TestCase):
def test_bind(self):
meter = metrics.MeterProvider().get_meter(__name__)
metric_types = [metrics.Counter, metrics.Measure]
labels = {"key": "value"}
key_labels = tuple(sorted(labels.items()))
for _type in metric_types:
metric = _type("name", "desc", "unit", int, meter, ("key",))
labels = {"key": "value"}
key_labels = tuple(sorted(labels.items()))
bound_instrument = metric.bind(labels)
self.assertEqual(
metric.bound_instruments.get(key_labels), bound_instrument
Expand Down