Adds interfaces for [Metrics api]#188
Adds interfaces for [Metrics api]#188isaikevych merged 4 commits intocensus-instrumentation:masterfrom
Conversation
7fc62c8 to
77ecbe4
Compare
| /** Properties of a TimeSeries. */ | ||
| export interface ITimeSeries { | ||
| /** TimeSeries startTimestamp */ | ||
| readonly startTimestamp: (Timestamp|null); |
There was a problem hiding this comment.
I think this should be (Timestamp|null) -> (google.protobuf.Timestamp|null), @songy23 Any thoughts?
There was a problem hiding this comment.
@mayurkale22 as you mentioned here issue 133 we cant use proto files, as an option I can create namespace google -> protobuf -> ...
| readonly value: (number|null); | ||
| } | ||
|
|
||
| export interface Timestamp { |
There was a problem hiding this comment.
Looks like we don't need this.
There was a problem hiding this comment.
The current interfaces uses this
|
Please fix the build |
| * In case of a streaming RPC this can be sent for metrics that already | ||
| * sent the MetricDescriptor once. | ||
| */ | ||
| readonly name: string; |
There was a problem hiding this comment.
Metric contains only MetricDescriptor and TimeSeries. Please remove readonly name: string;
There was a problem hiding this comment.
That's the name for MetricDescriptor.
| } | ||
|
|
||
| /** A timestamped measurement. */ | ||
| export interface Point { |
There was a problem hiding this comment.
The Point should have only timestamp and Value.
Refer https://github.com/census-instrumentation/opencensus-go/pull/969/files#diff-d6cca479b1a793ab4e0a1a3f22549f84R24 or Java/Python implementation.
| * (string) In case of a streaming RPC this can be sent for metrics | ||
| * that already sent the MetricDescriptor once. | ||
| */ | ||
| readonly descriptor: MetricDescriptor|string; |
There was a problem hiding this comment.
string is only for saving encoded bytes, in the API we should always use MetricDescriptor.
| * In case of a streaming RPC this can be sent for metrics that already | ||
| * sent the MetricDescriptor once. | ||
| */ | ||
| readonly name: string; |
There was a problem hiding this comment.
That's the name for MetricDescriptor.
songy23
left a comment
There was a problem hiding this comment.
LGTM. Please fix the CI.
Fixes #133