This repository was archived by the owner on Oct 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy pathmetrics.pb.go
1632 lines (1460 loc) · 65.1 KB
/
metrics.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright 2018, OpenCensus Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// This package describes the Metrics data model. It is currently experimental
// but may eventually become the wire format for metrics. Please see
// https://github.com/census-instrumentation/opencensus-specs/blob/master/stats/Metrics.md
// for more details.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.17.3
// source: opencensus/proto/metrics/v1/metrics.proto
package v1
import (
v1 "github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// The kind of metric. It describes how the data is reported.
//
// A gauge is an instantaneous measurement of a value.
//
// A cumulative measurement is a value accumulated over a time interval. In
// a time series, cumulative measurements should have the same start time,
// increasing values and increasing end times, until an event resets the
// cumulative value to zero and sets a new start time for the following
// points.
type MetricDescriptor_Type int32
const (
// Do not use this default value.
MetricDescriptor_UNSPECIFIED MetricDescriptor_Type = 0
// Integer gauge. The value can go both up and down.
MetricDescriptor_GAUGE_INT64 MetricDescriptor_Type = 1
// Floating point gauge. The value can go both up and down.
MetricDescriptor_GAUGE_DOUBLE MetricDescriptor_Type = 2
// Distribution gauge measurement. The count and sum can go both up and
// down. Recorded values are always >= 0.
// Used in scenarios like a snapshot of time the current items in a queue
// have spent there.
MetricDescriptor_GAUGE_DISTRIBUTION MetricDescriptor_Type = 3
// Integer cumulative measurement. The value cannot decrease, if resets
// then the start_time should also be reset.
MetricDescriptor_CUMULATIVE_INT64 MetricDescriptor_Type = 4
// Floating point cumulative measurement. The value cannot decrease, if
// resets then the start_time should also be reset. Recorded values are
// always >= 0.
MetricDescriptor_CUMULATIVE_DOUBLE MetricDescriptor_Type = 5
// Distribution cumulative measurement. The count and sum cannot decrease,
// if resets then the start_time should also be reset.
MetricDescriptor_CUMULATIVE_DISTRIBUTION MetricDescriptor_Type = 6
// Some frameworks implemented Histograms as a summary of observations
// (usually things like request durations and response sizes). While it
// also provides a total count of observations and a sum of all observed
// values, it calculates configurable percentiles over a sliding time
// window. This is not recommended, since it cannot be aggregated.
MetricDescriptor_SUMMARY MetricDescriptor_Type = 7
)
// Enum value maps for MetricDescriptor_Type.
var (
MetricDescriptor_Type_name = map[int32]string{
0: "UNSPECIFIED",
1: "GAUGE_INT64",
2: "GAUGE_DOUBLE",
3: "GAUGE_DISTRIBUTION",
4: "CUMULATIVE_INT64",
5: "CUMULATIVE_DOUBLE",
6: "CUMULATIVE_DISTRIBUTION",
7: "SUMMARY",
}
MetricDescriptor_Type_value = map[string]int32{
"UNSPECIFIED": 0,
"GAUGE_INT64": 1,
"GAUGE_DOUBLE": 2,
"GAUGE_DISTRIBUTION": 3,
"CUMULATIVE_INT64": 4,
"CUMULATIVE_DOUBLE": 5,
"CUMULATIVE_DISTRIBUTION": 6,
"SUMMARY": 7,
}
)
func (x MetricDescriptor_Type) Enum() *MetricDescriptor_Type {
p := new(MetricDescriptor_Type)
*p = x
return p
}
func (x MetricDescriptor_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MetricDescriptor_Type) Descriptor() protoreflect.EnumDescriptor {
return file_opencensus_proto_metrics_v1_metrics_proto_enumTypes[0].Descriptor()
}
func (MetricDescriptor_Type) Type() protoreflect.EnumType {
return &file_opencensus_proto_metrics_v1_metrics_proto_enumTypes[0]
}
func (x MetricDescriptor_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MetricDescriptor_Type.Descriptor instead.
func (MetricDescriptor_Type) EnumDescriptor() ([]byte, []int) {
return file_opencensus_proto_metrics_v1_metrics_proto_rawDescGZIP(), []int{1, 0}
}
// Defines a Metric which has one or more timeseries.
type Metric struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The descriptor of the Metric.
// TODO(issue #152): consider only sending the name of descriptor for
// optimization.
MetricDescriptor *MetricDescriptor `protobuf:"bytes,1,opt,name=metric_descriptor,json=metricDescriptor,proto3" json:"metric_descriptor,omitempty"`
// One or more timeseries for a single metric, where each timeseries has
// one or more points.
Timeseries []*TimeSeries `protobuf:"bytes,2,rep,name=timeseries,proto3" json:"timeseries,omitempty"`
// The resource for the metric. If unset, it may be set to a default value
// provided for a sequence of messages in an RPC stream.
Resource *v1.Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
}
func (x *Metric) Reset() {
*x = Metric{}
if protoimpl.UnsafeEnabled {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Metric) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Metric) ProtoMessage() {}
func (x *Metric) ProtoReflect() protoreflect.Message {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Metric.ProtoReflect.Descriptor instead.
func (*Metric) Descriptor() ([]byte, []int) {
return file_opencensus_proto_metrics_v1_metrics_proto_rawDescGZIP(), []int{0}
}
func (x *Metric) GetMetricDescriptor() *MetricDescriptor {
if x != nil {
return x.MetricDescriptor
}
return nil
}
func (x *Metric) GetTimeseries() []*TimeSeries {
if x != nil {
return x.Timeseries
}
return nil
}
func (x *Metric) GetResource() *v1.Resource {
if x != nil {
return x.Resource
}
return nil
}
// Defines a metric type and its schema.
type MetricDescriptor struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The metric type, including its DNS name prefix. It must be unique.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// A detailed description of the metric, which can be used in documentation.
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
// The unit in which the metric value is reported. Follows the format
// described by http://unitsofmeasure.org/ucum.html.
Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"`
Type MetricDescriptor_Type `protobuf:"varint,4,opt,name=type,proto3,enum=opencensus.proto.metrics.v1.MetricDescriptor_Type" json:"type,omitempty"`
// The label keys associated with the metric descriptor.
LabelKeys []*LabelKey `protobuf:"bytes,5,rep,name=label_keys,json=labelKeys,proto3" json:"label_keys,omitempty"`
}
func (x *MetricDescriptor) Reset() {
*x = MetricDescriptor{}
if protoimpl.UnsafeEnabled {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MetricDescriptor) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MetricDescriptor) ProtoMessage() {}
func (x *MetricDescriptor) ProtoReflect() protoreflect.Message {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MetricDescriptor.ProtoReflect.Descriptor instead.
func (*MetricDescriptor) Descriptor() ([]byte, []int) {
return file_opencensus_proto_metrics_v1_metrics_proto_rawDescGZIP(), []int{1}
}
func (x *MetricDescriptor) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *MetricDescriptor) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *MetricDescriptor) GetUnit() string {
if x != nil {
return x.Unit
}
return ""
}
func (x *MetricDescriptor) GetType() MetricDescriptor_Type {
if x != nil {
return x.Type
}
return MetricDescriptor_UNSPECIFIED
}
func (x *MetricDescriptor) GetLabelKeys() []*LabelKey {
if x != nil {
return x.LabelKeys
}
return nil
}
// Defines a label key associated with a metric descriptor.
type LabelKey struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The key for the label.
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// A human-readable description of what this label key represents.
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
}
func (x *LabelKey) Reset() {
*x = LabelKey{}
if protoimpl.UnsafeEnabled {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LabelKey) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LabelKey) ProtoMessage() {}
func (x *LabelKey) ProtoReflect() protoreflect.Message {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LabelKey.ProtoReflect.Descriptor instead.
func (*LabelKey) Descriptor() ([]byte, []int) {
return file_opencensus_proto_metrics_v1_metrics_proto_rawDescGZIP(), []int{2}
}
func (x *LabelKey) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
func (x *LabelKey) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
// A collection of data points that describes the time-varying values
// of a metric.
type TimeSeries struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Must be present for cumulative metrics. The time when the cumulative value
// was reset to zero. Exclusive. The cumulative value is over the time interval
// (start_timestamp, timestamp]. If not specified, the backend can use the
// previous recorded value.
StartTimestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=start_timestamp,json=startTimestamp,proto3" json:"start_timestamp,omitempty"`
// The set of label values that uniquely identify this timeseries. Applies to
// all points. The order of label values must match that of label keys in the
// metric descriptor.
LabelValues []*LabelValue `protobuf:"bytes,2,rep,name=label_values,json=labelValues,proto3" json:"label_values,omitempty"`
// The data points of this timeseries. Point.value type MUST match the
// MetricDescriptor.type.
Points []*Point `protobuf:"bytes,3,rep,name=points,proto3" json:"points,omitempty"`
}
func (x *TimeSeries) Reset() {
*x = TimeSeries{}
if protoimpl.UnsafeEnabled {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TimeSeries) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TimeSeries) ProtoMessage() {}
func (x *TimeSeries) ProtoReflect() protoreflect.Message {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TimeSeries.ProtoReflect.Descriptor instead.
func (*TimeSeries) Descriptor() ([]byte, []int) {
return file_opencensus_proto_metrics_v1_metrics_proto_rawDescGZIP(), []int{3}
}
func (x *TimeSeries) GetStartTimestamp() *timestamppb.Timestamp {
if x != nil {
return x.StartTimestamp
}
return nil
}
func (x *TimeSeries) GetLabelValues() []*LabelValue {
if x != nil {
return x.LabelValues
}
return nil
}
func (x *TimeSeries) GetPoints() []*Point {
if x != nil {
return x.Points
}
return nil
}
type LabelValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The value for the label.
Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
// If false the value field is ignored and considered not set.
// This is used to differentiate a missing label from an empty string.
HasValue bool `protobuf:"varint,2,opt,name=has_value,json=hasValue,proto3" json:"has_value,omitempty"`
}
func (x *LabelValue) Reset() {
*x = LabelValue{}
if protoimpl.UnsafeEnabled {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LabelValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LabelValue) ProtoMessage() {}
func (x *LabelValue) ProtoReflect() protoreflect.Message {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LabelValue.ProtoReflect.Descriptor instead.
func (*LabelValue) Descriptor() ([]byte, []int) {
return file_opencensus_proto_metrics_v1_metrics_proto_rawDescGZIP(), []int{4}
}
func (x *LabelValue) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
func (x *LabelValue) GetHasValue() bool {
if x != nil {
return x.HasValue
}
return false
}
// A timestamped measurement.
type Point struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The moment when this point was recorded. Inclusive.
// If not specified, the timestamp will be decided by the backend.
Timestamp *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// The actual point value.
//
// Types that are assignable to Value:
// *Point_Int64Value
// *Point_DoubleValue
// *Point_DistributionValue
// *Point_SummaryValue
Value isPoint_Value `protobuf_oneof:"value"`
}
func (x *Point) Reset() {
*x = Point{}
if protoimpl.UnsafeEnabled {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Point) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Point) ProtoMessage() {}
func (x *Point) ProtoReflect() protoreflect.Message {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Point.ProtoReflect.Descriptor instead.
func (*Point) Descriptor() ([]byte, []int) {
return file_opencensus_proto_metrics_v1_metrics_proto_rawDescGZIP(), []int{5}
}
func (x *Point) GetTimestamp() *timestamppb.Timestamp {
if x != nil {
return x.Timestamp
}
return nil
}
func (m *Point) GetValue() isPoint_Value {
if m != nil {
return m.Value
}
return nil
}
func (x *Point) GetInt64Value() int64 {
if x, ok := x.GetValue().(*Point_Int64Value); ok {
return x.Int64Value
}
return 0
}
func (x *Point) GetDoubleValue() float64 {
if x, ok := x.GetValue().(*Point_DoubleValue); ok {
return x.DoubleValue
}
return 0
}
func (x *Point) GetDistributionValue() *DistributionValue {
if x, ok := x.GetValue().(*Point_DistributionValue); ok {
return x.DistributionValue
}
return nil
}
func (x *Point) GetSummaryValue() *SummaryValue {
if x, ok := x.GetValue().(*Point_SummaryValue); ok {
return x.SummaryValue
}
return nil
}
type isPoint_Value interface {
isPoint_Value()
}
type Point_Int64Value struct {
// A 64-bit integer.
Int64Value int64 `protobuf:"varint,2,opt,name=int64_value,json=int64Value,proto3,oneof"`
}
type Point_DoubleValue struct {
// A 64-bit double-precision floating-point number.
DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,proto3,oneof"`
}
type Point_DistributionValue struct {
// A distribution value.
DistributionValue *DistributionValue `protobuf:"bytes,4,opt,name=distribution_value,json=distributionValue,proto3,oneof"`
}
type Point_SummaryValue struct {
// A summary value. This is not recommended, since it cannot be aggregated.
SummaryValue *SummaryValue `protobuf:"bytes,5,opt,name=summary_value,json=summaryValue,proto3,oneof"`
}
func (*Point_Int64Value) isPoint_Value() {}
func (*Point_DoubleValue) isPoint_Value() {}
func (*Point_DistributionValue) isPoint_Value() {}
func (*Point_SummaryValue) isPoint_Value() {}
// Distribution contains summary statistics for a population of values. It
// optionally contains a histogram representing the distribution of those
// values across a set of buckets.
type DistributionValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The number of values in the population. Must be non-negative. This value
// must equal the sum of the values in bucket_counts if a histogram is
// provided.
Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
// The sum of the values in the population. If count is zero then this field
// must be zero.
Sum float64 `protobuf:"fixed64,2,opt,name=sum,proto3" json:"sum,omitempty"`
// The sum of squared deviations from the mean of the values in the
// population. For values x_i this is:
//
// Sum[i=1..n]((x_i - mean)^2)
//
// Knuth, "The Art of Computer Programming", Vol. 2, page 323, 3rd edition
// describes Welford's method for accumulating this sum in one pass.
//
// If count is zero then this field must be zero.
SumOfSquaredDeviation float64 `protobuf:"fixed64,3,opt,name=sum_of_squared_deviation,json=sumOfSquaredDeviation,proto3" json:"sum_of_squared_deviation,omitempty"`
// Don't change bucket boundaries within a TimeSeries if your backend doesn't
// support this.
// TODO(issue #152): consider not required to send bucket options for
// optimization.
BucketOptions *DistributionValue_BucketOptions `protobuf:"bytes,4,opt,name=bucket_options,json=bucketOptions,proto3" json:"bucket_options,omitempty"`
// If the distribution does not have a histogram, then omit this field.
// If there is a histogram, then the sum of the values in the Bucket counts
// must equal the value in the count field of the distribution.
Buckets []*DistributionValue_Bucket `protobuf:"bytes,5,rep,name=buckets,proto3" json:"buckets,omitempty"`
}
func (x *DistributionValue) Reset() {
*x = DistributionValue{}
if protoimpl.UnsafeEnabled {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DistributionValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DistributionValue) ProtoMessage() {}
func (x *DistributionValue) ProtoReflect() protoreflect.Message {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DistributionValue.ProtoReflect.Descriptor instead.
func (*DistributionValue) Descriptor() ([]byte, []int) {
return file_opencensus_proto_metrics_v1_metrics_proto_rawDescGZIP(), []int{6}
}
func (x *DistributionValue) GetCount() int64 {
if x != nil {
return x.Count
}
return 0
}
func (x *DistributionValue) GetSum() float64 {
if x != nil {
return x.Sum
}
return 0
}
func (x *DistributionValue) GetSumOfSquaredDeviation() float64 {
if x != nil {
return x.SumOfSquaredDeviation
}
return 0
}
func (x *DistributionValue) GetBucketOptions() *DistributionValue_BucketOptions {
if x != nil {
return x.BucketOptions
}
return nil
}
func (x *DistributionValue) GetBuckets() []*DistributionValue_Bucket {
if x != nil {
return x.Buckets
}
return nil
}
// The start_timestamp only applies to the count and sum in the SummaryValue.
type SummaryValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The total number of recorded values since start_time. Optional since
// some systems don't expose this.
Count *wrapperspb.Int64Value `protobuf:"bytes,1,opt,name=count,proto3" json:"count,omitempty"`
// The total sum of recorded values since start_time. Optional since some
// systems don't expose this. If count is zero then this field must be zero.
// This field must be unset if the sum is not available.
Sum *wrapperspb.DoubleValue `protobuf:"bytes,2,opt,name=sum,proto3" json:"sum,omitempty"`
// Values calculated over an arbitrary time window.
Snapshot *SummaryValue_Snapshot `protobuf:"bytes,3,opt,name=snapshot,proto3" json:"snapshot,omitempty"`
}
func (x *SummaryValue) Reset() {
*x = SummaryValue{}
if protoimpl.UnsafeEnabled {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SummaryValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SummaryValue) ProtoMessage() {}
func (x *SummaryValue) ProtoReflect() protoreflect.Message {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SummaryValue.ProtoReflect.Descriptor instead.
func (*SummaryValue) Descriptor() ([]byte, []int) {
return file_opencensus_proto_metrics_v1_metrics_proto_rawDescGZIP(), []int{7}
}
func (x *SummaryValue) GetCount() *wrapperspb.Int64Value {
if x != nil {
return x.Count
}
return nil
}
func (x *SummaryValue) GetSum() *wrapperspb.DoubleValue {
if x != nil {
return x.Sum
}
return nil
}
func (x *SummaryValue) GetSnapshot() *SummaryValue_Snapshot {
if x != nil {
return x.Snapshot
}
return nil
}
// A Distribution may optionally contain a histogram of the values in the
// population. The bucket boundaries for that histogram are described by
// BucketOptions.
//
// If bucket_options has no type, then there is no histogram associated with
// the Distribution.
type DistributionValue_BucketOptions struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Type:
// *DistributionValue_BucketOptions_Explicit_
Type isDistributionValue_BucketOptions_Type `protobuf_oneof:"type"`
}
func (x *DistributionValue_BucketOptions) Reset() {
*x = DistributionValue_BucketOptions{}
if protoimpl.UnsafeEnabled {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DistributionValue_BucketOptions) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DistributionValue_BucketOptions) ProtoMessage() {}
func (x *DistributionValue_BucketOptions) ProtoReflect() protoreflect.Message {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DistributionValue_BucketOptions.ProtoReflect.Descriptor instead.
func (*DistributionValue_BucketOptions) Descriptor() ([]byte, []int) {
return file_opencensus_proto_metrics_v1_metrics_proto_rawDescGZIP(), []int{6, 0}
}
func (m *DistributionValue_BucketOptions) GetType() isDistributionValue_BucketOptions_Type {
if m != nil {
return m.Type
}
return nil
}
func (x *DistributionValue_BucketOptions) GetExplicit() *DistributionValue_BucketOptions_Explicit {
if x, ok := x.GetType().(*DistributionValue_BucketOptions_Explicit_); ok {
return x.Explicit
}
return nil
}
type isDistributionValue_BucketOptions_Type interface {
isDistributionValue_BucketOptions_Type()
}
type DistributionValue_BucketOptions_Explicit_ struct {
// Bucket with explicit bounds.
Explicit *DistributionValue_BucketOptions_Explicit `protobuf:"bytes,1,opt,name=explicit,proto3,oneof"`
}
func (*DistributionValue_BucketOptions_Explicit_) isDistributionValue_BucketOptions_Type() {}
type DistributionValue_Bucket struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The number of values in each bucket of the histogram, as described in
// bucket_bounds.
Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
// If the distribution does not have a histogram, then omit this field.
Exemplar *DistributionValue_Exemplar `protobuf:"bytes,2,opt,name=exemplar,proto3" json:"exemplar,omitempty"`
}
func (x *DistributionValue_Bucket) Reset() {
*x = DistributionValue_Bucket{}
if protoimpl.UnsafeEnabled {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DistributionValue_Bucket) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DistributionValue_Bucket) ProtoMessage() {}
func (x *DistributionValue_Bucket) ProtoReflect() protoreflect.Message {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DistributionValue_Bucket.ProtoReflect.Descriptor instead.
func (*DistributionValue_Bucket) Descriptor() ([]byte, []int) {
return file_opencensus_proto_metrics_v1_metrics_proto_rawDescGZIP(), []int{6, 1}
}
func (x *DistributionValue_Bucket) GetCount() int64 {
if x != nil {
return x.Count
}
return 0
}
func (x *DistributionValue_Bucket) GetExemplar() *DistributionValue_Exemplar {
if x != nil {
return x.Exemplar
}
return nil
}
// Exemplars are example points that may be used to annotate aggregated
// Distribution values. They are metadata that gives information about a
// particular value added to a Distribution bucket.
type DistributionValue_Exemplar struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Value of the exemplar point. It determines which bucket the exemplar
// belongs to.
Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
// The observation (sampling) time of the above value.
Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
// Contextual information about the example value.
Attachments map[string]string `protobuf:"bytes,3,rep,name=attachments,proto3" json:"attachments,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *DistributionValue_Exemplar) Reset() {
*x = DistributionValue_Exemplar{}
if protoimpl.UnsafeEnabled {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DistributionValue_Exemplar) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DistributionValue_Exemplar) ProtoMessage() {}
func (x *DistributionValue_Exemplar) ProtoReflect() protoreflect.Message {
mi := &file_opencensus_proto_metrics_v1_metrics_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DistributionValue_Exemplar.ProtoReflect.Descriptor instead.
func (*DistributionValue_Exemplar) Descriptor() ([]byte, []int) {
return file_opencensus_proto_metrics_v1_metrics_proto_rawDescGZIP(), []int{6, 2}
}
func (x *DistributionValue_Exemplar) GetValue() float64 {
if x != nil {
return x.Value
}
return 0
}
func (x *DistributionValue_Exemplar) GetTimestamp() *timestamppb.Timestamp {
if x != nil {
return x.Timestamp
}
return nil
}
func (x *DistributionValue_Exemplar) GetAttachments() map[string]string {
if x != nil {
return x.Attachments
}
return nil
}
// Specifies a set of buckets with arbitrary upper-bounds.
// This defines size(bounds) + 1 (= N) buckets. The boundaries for bucket
// index i are:
//
// [0, bucket_bounds[i]) for i == 0
// [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-1
// [bucket_bounds[i], +infinity) for i == N-1
type DistributionValue_BucketOptions_Explicit struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The values must be strictly increasing and > 0.
Bounds []float64 `protobuf:"fixed64,1,rep,packed,name=bounds,proto3" json:"bounds,omitempty"`
}
func (x *DistributionValue_BucketOptions_Explicit) Reset() {
*x = DistributionValue_BucketOptions_Explicit{}
if protoimpl.UnsafeEnabled {