This repository was archived by the owner on Sep 17, 2025. It is now read-only.
Add MetricDescriptor class, tests#342
Merged
c24t merged 2 commits intocensus-instrumentation:masterfrom Oct 10, 2018
Merged
Conversation
c24t
commented
Oct 9, 2018
| MetricDescriptorType is an enum of valid MetricDescriptor type values. See | ||
| opencensus-proto for details: | ||
|
|
||
| https://github.com/census-instrumentation/opencensus-proto/blob/24333298e36590ea0716598caacc8959fc393c48/src/opencensus/proto/metrics/v1/metrics.proto#L73 # noqa |
Member
Author
There was a problem hiding this comment.
I wasn't sure whether to include this, but since we're copying these wholesale from the spec I thought it'd be helpful to have a link. We might also consider generating code for this kind of thing.
c24t
commented
Oct 9, 2018
| and sets a new start time for the following points. | ||
|
|
||
| """ | ||
| __metaclass__ = _MetricDescriptorTypeMeta |
Member
Author
There was a problem hiding this comment.
I'm happy to change this if you've got a different preferred way of handling enums.
Member
Author
There was a problem hiding this comment.
Changed to use six.add_metaclass for python 3.
fd9e4f9 to
99b510b
Compare
99b510b to
12057a4
Compare
mayurkale22
approved these changes
Oct 9, 2018
Contributor
|
@c24t Do you have access to merge commits now? |
Member
Author
I do, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a largely mechanical translation of the Java client's
MetricDescriptorclass, in the style of the other metrics classes from #337.Addresses #335.