Skip to content

Commit 42962cf

Browse files
authored
fix build warning and updated the metric proto link (census-instrumentation#473)
1 parent 6ac7d23 commit 42962cf

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

opencensus/metrics/export/metric.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ class Metric(object):
1919
"""A collection of time series data and label metadata.
2020
2121
This class implements the spec for v1 Metrics as of opencensus-proto
22-
release v0.0.2. See opencensus-proto for details:
22+
release v0.1.0. See opencensus-proto for details:
2323
24-
https://github.com/census-instrumentation/opencensus-proto/blob/24333298e36590ea0716598caacc8959fc393c48/src/opencensus/proto/metrics/v1/metrics.proto#33
24+
https://github.com/census-instrumentation/opencensus-proto/blob/v0.1.0/src/opencensus/proto/metrics/v1/metrics.proto#L35
2525
2626
Defines a Metric which has one or more timeseries.
2727

opencensus/metrics/export/metric_descriptor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class MetricDescriptorType(object):
3838
MetricDescriptorType is an enum of valid MetricDescriptor type values. See
3939
opencensus-proto for details:
4040
41-
https://github.com/census-instrumentation/opencensus-proto/blob/24333298e36590ea0716598caacc8959fc393c48/src/opencensus/proto/metrics/v1/metrics.proto#L73 # noqa
41+
https://github.com/census-instrumentation/opencensus-proto/blob/v0.1.0/src/opencensus/proto/metrics/v1/metrics.proto#L79
4242
4343
A gauge is an instantaneous measurement of a value.
4444
@@ -102,9 +102,9 @@ class MetricDescriptor(object):
102102
"""Defines a metric type and its schema.
103103
104104
This class implements the spec for v1 MetricDescriptors, as of
105-
opencensus-proto release v0.0.2. See opencensus-proto for details:
105+
opencensus-proto release v0.1.0. See opencensus-proto for details:
106106
107-
https://github.com/census-instrumentation/opencensus-proto/blob/24333298e36590ea0716598caacc8959fc393c48/src/opencensus/proto/metrics/v1/metrics.proto#L53 # noqa
107+
https://github.com/census-instrumentation/opencensus-proto/blob/v0.1.0/src/opencensus/proto/metrics/v1/metrics.proto#L59
108108
109109
:type name: str
110110
:param name: The metric type, including its DNS name prefix. It must be

opencensus/metrics/export/time_series.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ class TimeSeries(object):
1717
"""Time series data for a given metric and time interval.
1818
1919
This class implements the spec for v1 TimeSeries structs as of
20-
opencensus-proto release v0.0.2. See opencensus-proto for details:
20+
opencensus-proto release v0.1.0. See opencensus-proto for details:
2121
22-
https://github.com/census-instrumentation/opencensus-proto/blob/24333298e36590ea0716598caacc8959fc393c48/src/opencensus/proto/metrics/v1/metrics.proto#L112
22+
https://github.com/census-instrumentation/opencensus-proto/blob/v0.1.0/src/opencensus/proto/metrics/v1/metrics.proto#L132
2323
2424
A TimeSeries is a collection of data points that describes the time-varying
2525
values of a metric.

opencensus/metrics/export/value.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
# limitations under the License.
1414
"""
1515
The classes in this module implement the spec for v1 Metrics as of
16-
opencensus-proto release v0.0.2. See opencensus-proto for details:
16+
opencensus-proto release v0.1.0. See opencensus-proto for details:
1717
18-
https://github.com/census-instrumentation/opencensus-proto/blob/24333298e36590ea0716598caacc8959fc393c48/src/opencensus/proto/metrics/v1/metrics.proto
18+
https://github.com/census-instrumentation/opencensus-proto/blob/v0.1.0/src/opencensus/proto/metrics/v1/metrics.proto
1919
""" # noqa
2020

2121
from copy import copy

opencensus/trace/tracestate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def append(self, key, value):
4747
# if the tracestate value size is bigger than 512 characters, the tracer
4848
# CAN decide to forward the tracestate
4949
def is_valid(self):
50-
if len(self) is 0:
50+
if len(self) == 0:
5151
return False
5252
# there can be a maximum of 32 list-members in a list
5353
if len(self) > 32:

0 commit comments

Comments
 (0)