diff --git a/gen-go/exporterproto/exporter.pb.go b/gen-go/exporterproto/exporter.pb.go new file mode 100644 index 0000000..40cd612 --- /dev/null +++ b/gen-go/exporterproto/exporter.pb.go @@ -0,0 +1,288 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: opencensus/proto/exporter/exporter.proto + +/* +Package exporterproto is a generated protocol buffer package. + +It is generated from these files: + opencensus/proto/exporter/exporter.proto + +It has these top-level messages: + ExportSpanRequest + ExportSpanResponse + ExportMetricsRequest + ExportMetricsResponse +*/ +package exporterproto + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import opencensus_proto_trace "github.com/census-instrumentation/opencensus-proto/gen-go/traceproto" +import opencensus_proto_stats_metrics "github.com/census-instrumentation/opencensus-proto/gen-go/statsproto/metricsproto" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +type ExportSpanRequest struct { + Spans []*opencensus_proto_trace.Span `protobuf:"bytes,1,rep,name=spans" json:"spans,omitempty"` +} + +func (m *ExportSpanRequest) Reset() { *m = ExportSpanRequest{} } +func (m *ExportSpanRequest) String() string { return proto.CompactTextString(m) } +func (*ExportSpanRequest) ProtoMessage() {} +func (*ExportSpanRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *ExportSpanRequest) GetSpans() []*opencensus_proto_trace.Span { + if m != nil { + return m.Spans + } + return nil +} + +type ExportSpanResponse struct { +} + +func (m *ExportSpanResponse) Reset() { *m = ExportSpanResponse{} } +func (m *ExportSpanResponse) String() string { return proto.CompactTextString(m) } +func (*ExportSpanResponse) ProtoMessage() {} +func (*ExportSpanResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +type ExportMetricsRequest struct { + Metrics []*opencensus_proto_stats_metrics.Metric `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"` +} + +func (m *ExportMetricsRequest) Reset() { *m = ExportMetricsRequest{} } +func (m *ExportMetricsRequest) String() string { return proto.CompactTextString(m) } +func (*ExportMetricsRequest) ProtoMessage() {} +func (*ExportMetricsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *ExportMetricsRequest) GetMetrics() []*opencensus_proto_stats_metrics.Metric { + if m != nil { + return m.Metrics + } + return nil +} + +type ExportMetricsResponse struct { +} + +func (m *ExportMetricsResponse) Reset() { *m = ExportMetricsResponse{} } +func (m *ExportMetricsResponse) String() string { return proto.CompactTextString(m) } +func (*ExportMetricsResponse) ProtoMessage() {} +func (*ExportMetricsResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func init() { + proto.RegisterType((*ExportSpanRequest)(nil), "opencensus.proto.exporter.ExportSpanRequest") + proto.RegisterType((*ExportSpanResponse)(nil), "opencensus.proto.exporter.ExportSpanResponse") + proto.RegisterType((*ExportMetricsRequest)(nil), "opencensus.proto.exporter.ExportMetricsRequest") + proto.RegisterType((*ExportMetricsResponse)(nil), "opencensus.proto.exporter.ExportMetricsResponse") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// Client API for Export service + +type ExportClient interface { + ExportSpan(ctx context.Context, opts ...grpc.CallOption) (Export_ExportSpanClient, error) + ExportMetrics(ctx context.Context, opts ...grpc.CallOption) (Export_ExportMetricsClient, error) +} + +type exportClient struct { + cc *grpc.ClientConn +} + +func NewExportClient(cc *grpc.ClientConn) ExportClient { + return &exportClient{cc} +} + +func (c *exportClient) ExportSpan(ctx context.Context, opts ...grpc.CallOption) (Export_ExportSpanClient, error) { + stream, err := grpc.NewClientStream(ctx, &_Export_serviceDesc.Streams[0], c.cc, "/opencensus.proto.exporter.Export/ExportSpan", opts...) + if err != nil { + return nil, err + } + x := &exportExportSpanClient{stream} + return x, nil +} + +type Export_ExportSpanClient interface { + Send(*ExportSpanRequest) error + Recv() (*ExportSpanResponse, error) + grpc.ClientStream +} + +type exportExportSpanClient struct { + grpc.ClientStream +} + +func (x *exportExportSpanClient) Send(m *ExportSpanRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *exportExportSpanClient) Recv() (*ExportSpanResponse, error) { + m := new(ExportSpanResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *exportClient) ExportMetrics(ctx context.Context, opts ...grpc.CallOption) (Export_ExportMetricsClient, error) { + stream, err := grpc.NewClientStream(ctx, &_Export_serviceDesc.Streams[1], c.cc, "/opencensus.proto.exporter.Export/ExportMetrics", opts...) + if err != nil { + return nil, err + } + x := &exportExportMetricsClient{stream} + return x, nil +} + +type Export_ExportMetricsClient interface { + Send(*ExportMetricsRequest) error + Recv() (*ExportMetricsResponse, error) + grpc.ClientStream +} + +type exportExportMetricsClient struct { + grpc.ClientStream +} + +func (x *exportExportMetricsClient) Send(m *ExportMetricsRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *exportExportMetricsClient) Recv() (*ExportMetricsResponse, error) { + m := new(ExportMetricsResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// Server API for Export service + +type ExportServer interface { + ExportSpan(Export_ExportSpanServer) error + ExportMetrics(Export_ExportMetricsServer) error +} + +func RegisterExportServer(s *grpc.Server, srv ExportServer) { + s.RegisterService(&_Export_serviceDesc, srv) +} + +func _Export_ExportSpan_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ExportServer).ExportSpan(&exportExportSpanServer{stream}) +} + +type Export_ExportSpanServer interface { + Send(*ExportSpanResponse) error + Recv() (*ExportSpanRequest, error) + grpc.ServerStream +} + +type exportExportSpanServer struct { + grpc.ServerStream +} + +func (x *exportExportSpanServer) Send(m *ExportSpanResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *exportExportSpanServer) Recv() (*ExportSpanRequest, error) { + m := new(ExportSpanRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func _Export_ExportMetrics_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ExportServer).ExportMetrics(&exportExportMetricsServer{stream}) +} + +type Export_ExportMetricsServer interface { + Send(*ExportMetricsResponse) error + Recv() (*ExportMetricsRequest, error) + grpc.ServerStream +} + +type exportExportMetricsServer struct { + grpc.ServerStream +} + +func (x *exportExportMetricsServer) Send(m *ExportMetricsResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *exportExportMetricsServer) Recv() (*ExportMetricsRequest, error) { + m := new(ExportMetricsRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _Export_serviceDesc = grpc.ServiceDesc{ + ServiceName: "opencensus.proto.exporter.Export", + HandlerType: (*ExportServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "ExportSpan", + Handler: _Export_ExportSpan_Handler, + ServerStreams: true, + ClientStreams: true, + }, + { + StreamName: "ExportMetrics", + Handler: _Export_ExportMetrics_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "opencensus/proto/exporter/exporter.proto", +} + +func init() { proto.RegisterFile("opencensus/proto/exporter/exporter.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 305 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcf, 0x4a, 0xf3, 0x40, + 0x10, 0xff, 0xc2, 0x87, 0x15, 0x46, 0x3c, 0xb8, 0x54, 0xd4, 0xd0, 0x83, 0xe4, 0x20, 0x3d, 0x34, + 0xbb, 0xa5, 0xbe, 0x80,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, 0x34, 0x9a, 0x47, 0xa2, 0x81, + 0xcb, 0x83, 0x52, 0x42, 0xfd, 0xe9, 0x72, 0xb8, 0x98, 0x78, 0x7e, 0xba, 0x60, 0x3f, 0x79, 0xd9, + 0xc0, 0xa4, 0x34, 0xc7, 0xb5, 0xcb, 0xb6, 0x17, 0xba, 0xf5, 0x0f, 0xbe, 0x8e, 0xde, 0x57, 0x45, + 0x49, 0x1f, 0xf5, 0x56, 0xe6, 0xa6, 0x52, 0x2c, 0x49, 0x4b, 0xed, 0xc9, 0xd5, 0x15, 0x6a, 0xca, + 0xa8, 0x34, 0x5a, 0xf5, 0x6e, 0x29, 0x1f, 0x52, 0x81, 0x3a, 0x2d, 0xfa, 0xc3, 0x0d, 0xe0, 0x76, + 0x14, 0xc6, 0xe3, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x58, 0x53, 0x94, 0xb0, 0xe1, 0x02, 0x00, + 0x00, +} diff --git a/gen-go/statsproto/doc.go b/gen-go/statsproto/doc.go deleted file mode 100644 index da25657..0000000 --- a/gen-go/statsproto/doc.go +++ /dev/null @@ -1,19 +0,0 @@ -// 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. -// - -// Package statsproto contains generated Protobuf code for OpenCensus stats. -package statsproto - -//go:generate protoc -I ../../opencensus/proto/stats --go_out=. stats.proto diff --git a/gen-go/statsproto/metricsproto/metrics.pb.go b/gen-go/statsproto/metricsproto/metrics.pb.go new file mode 100644 index 0000000..a58fd7b --- /dev/null +++ b/gen-go/statsproto/metricsproto/metrics.pb.go @@ -0,0 +1,767 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: opencensus/proto/stats/metrics/metrics.proto + +/* +Package metricsproto is a generated protocol buffer package. + +It is generated from these files: + opencensus/proto/stats/metrics/metrics.proto + +It has these top-level messages: + MetricSet + Metric + MetricDescriptor + LabelKey + TimeSeries + LabelValue + GaugePoint + CumulativePoint + DistributionValue +*/ +package metricsproto + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +// The kind of metric. It describes how the data is reported. +type MetricDescriptor_Type int32 + +const ( + // Do not use this default value. + MetricDescriptor_UNSPECIFIED MetricDescriptor_Type = 0 + // An instantaneous measurement of a value. + MetricDescriptor_GAUGE MetricDescriptor_Type = 1 + // A value accumulated over a time interval. Cumulative measurements in a + // time series should have the same start time and increasing end times, + // until an event resets the cumulative value to zero and sets a new + // start time for the following points. + MetricDescriptor_CUMULATIVE MetricDescriptor_Type = 2 +) + +var MetricDescriptor_Type_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "GAUGE", + 2: "CUMULATIVE", +} +var MetricDescriptor_Type_value = map[string]int32{ + "UNSPECIFIED": 0, + "GAUGE": 1, + "CUMULATIVE": 2, +} + +func (x MetricDescriptor_Type) String() string { + return proto.EnumName(MetricDescriptor_Type_name, int32(x)) +} +func (MetricDescriptor_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} } + +// A collection of Metrics, used for batching. +type MetricSet struct { + // Each Metric has one or more timeseries. + Metrics []*Metric `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"` +} + +func (m *MetricSet) Reset() { *m = MetricSet{} } +func (m *MetricSet) String() string { return proto.CompactTextString(m) } +func (*MetricSet) ProtoMessage() {} +func (*MetricSet) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +func (m *MetricSet) GetMetrics() []*Metric { + if m != nil { + return m.Metrics + } + return nil +} + +// Defines a Metric which has one or more timeseries. +type Metric struct { + // The definition of the Metric. For now, we send the full MetricDescriptor + // every time in order to keep the protocol stateless, but this is one of the + // places where we can make future changes to make the protocol more + // efficient. + MetricDescriptor *MetricDescriptor `protobuf:"bytes,1,opt,name=metric_descriptor,json=metricDescriptor" 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" json:"timeseries,omitempty"` +} + +func (m *Metric) Reset() { *m = Metric{} } +func (m *Metric) String() string { return proto.CompactTextString(m) } +func (*Metric) ProtoMessage() {} +func (*Metric) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *Metric) GetMetricDescriptor() *MetricDescriptor { + if m != nil { + return m.MetricDescriptor + } + return nil +} + +func (m *Metric) GetTimeseries() []*TimeSeries { + if m != nil { + return m.Timeseries + } + return nil +} + +// Defines a metric type and its schema. +type MetricDescriptor struct { + // The metric type, including its DNS name prefix. It must be unique. + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // A detailed description of the metric, which can be used in documentation. + Description string `protobuf:"bytes,2,opt,name=description" 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" json:"unit,omitempty"` + Type MetricDescriptor_Type `protobuf:"varint,4,opt,name=type,enum=opencensus.proto.stats.metrics.MetricDescriptor_Type" json:"type,omitempty"` + // The label keys associated with the metric descriptor. + LabelKeys []*LabelKey `protobuf:"bytes,5,rep,name=label_keys,json=labelKeys" json:"label_keys,omitempty"` +} + +func (m *MetricDescriptor) Reset() { *m = MetricDescriptor{} } +func (m *MetricDescriptor) String() string { return proto.CompactTextString(m) } +func (*MetricDescriptor) ProtoMessage() {} +func (*MetricDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } + +func (m *MetricDescriptor) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *MetricDescriptor) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *MetricDescriptor) GetUnit() string { + if m != nil { + return m.Unit + } + return "" +} + +func (m *MetricDescriptor) GetType() MetricDescriptor_Type { + if m != nil { + return m.Type + } + return MetricDescriptor_UNSPECIFIED +} + +func (m *MetricDescriptor) GetLabelKeys() []*LabelKey { + if m != nil { + return m.LabelKeys + } + return nil +} + +// Defines a label key associated with a metric descriptor. +type LabelKey struct { + // The key for the label. + Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` + // A human-readable description of what this label key represents. + Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` +} + +func (m *LabelKey) Reset() { *m = LabelKey{} } +func (m *LabelKey) String() string { return proto.CompactTextString(m) } +func (*LabelKey) ProtoMessage() {} +func (*LabelKey) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } + +func (m *LabelKey) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *LabelKey) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +// A collection of data points that describes the time-varying values +// of a metric. +type TimeSeries struct { + // TODO: Add restrictions for characters that can be used for keys and values. + // The set of label values that uniquely identify this timeseries. Apply to all + // points. The order of label values must match that of label keys in the + // metric descriptor. + LabelValues []*LabelValue `protobuf:"bytes,1,rep,name=label_values,json=labelValues" json:"label_values,omitempty"` + // The data points of this timeseries. Point type MUST match the MetricDescriptor.type, so for + // a CUMULATIVE type only cumulative_points are present and for a GAUGE type only gauge_points + // are present. + GaugePoints []*GaugePoint `protobuf:"bytes,2,rep,name=gauge_points,json=gaugePoints" json:"gauge_points,omitempty"` + CumulativePoints []*CumulativePoint `protobuf:"bytes,3,rep,name=cumulative_points,json=cumulativePoints" json:"cumulative_points,omitempty"` +} + +func (m *TimeSeries) Reset() { *m = TimeSeries{} } +func (m *TimeSeries) String() string { return proto.CompactTextString(m) } +func (*TimeSeries) ProtoMessage() {} +func (*TimeSeries) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } + +func (m *TimeSeries) GetLabelValues() []*LabelValue { + if m != nil { + return m.LabelValues + } + return nil +} + +func (m *TimeSeries) GetGaugePoints() []*GaugePoint { + if m != nil { + return m.GaugePoints + } + return nil +} + +func (m *TimeSeries) GetCumulativePoints() []*CumulativePoint { + if m != nil { + return m.CumulativePoints + } + return nil +} + +type LabelValue struct { + // The value for the label. + Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` + // If false the value field is ignored and considered not set. + HasValue bool `protobuf:"varint,2,opt,name=has_value,json=hasValue" json:"has_value,omitempty"` +} + +func (m *LabelValue) Reset() { *m = LabelValue{} } +func (m *LabelValue) String() string { return proto.CompactTextString(m) } +func (*LabelValue) ProtoMessage() {} +func (*LabelValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +func (m *LabelValue) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +func (m *LabelValue) GetHasValue() bool { + if m != nil { + return m.HasValue + } + return false +} + +// An instantaneous measurement of a value. +type GaugePoint struct { + // The moment when this gauge point was recorded. + Timestamp *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"` + // The actual point value. + // + // Types that are valid to be assigned to Value: + // *GaugePoint_Int64Value + // *GaugePoint_DoubleValue + Value isGaugePoint_Value `protobuf_oneof:"value"` +} + +func (m *GaugePoint) Reset() { *m = GaugePoint{} } +func (m *GaugePoint) String() string { return proto.CompactTextString(m) } +func (*GaugePoint) ProtoMessage() {} +func (*GaugePoint) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +type isGaugePoint_Value interface { + isGaugePoint_Value() +} + +type GaugePoint_Int64Value struct { + Int64Value int64 `protobuf:"varint,2,opt,name=int64_value,json=int64Value,oneof"` +} +type GaugePoint_DoubleValue struct { + DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,oneof"` +} + +func (*GaugePoint_Int64Value) isGaugePoint_Value() {} +func (*GaugePoint_DoubleValue) isGaugePoint_Value() {} + +func (m *GaugePoint) GetValue() isGaugePoint_Value { + if m != nil { + return m.Value + } + return nil +} + +func (m *GaugePoint) GetTimestamp() *google_protobuf.Timestamp { + if m != nil { + return m.Timestamp + } + return nil +} + +func (m *GaugePoint) GetInt64Value() int64 { + if x, ok := m.GetValue().(*GaugePoint_Int64Value); ok { + return x.Int64Value + } + return 0 +} + +func (m *GaugePoint) GetDoubleValue() float64 { + if x, ok := m.GetValue().(*GaugePoint_DoubleValue); ok { + return x.DoubleValue + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*GaugePoint) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _GaugePoint_OneofMarshaler, _GaugePoint_OneofUnmarshaler, _GaugePoint_OneofSizer, []interface{}{ + (*GaugePoint_Int64Value)(nil), + (*GaugePoint_DoubleValue)(nil), + } +} + +func _GaugePoint_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*GaugePoint) + // value + switch x := m.Value.(type) { + case *GaugePoint_Int64Value: + b.EncodeVarint(2<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.Int64Value)) + case *GaugePoint_DoubleValue: + b.EncodeVarint(3<<3 | proto.WireFixed64) + b.EncodeFixed64(math.Float64bits(x.DoubleValue)) + case nil: + default: + return fmt.Errorf("GaugePoint.Value has unexpected type %T", x) + } + return nil +} + +func _GaugePoint_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*GaugePoint) + switch tag { + case 2: // value.int64_value + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Value = &GaugePoint_Int64Value{int64(x)} + return true, err + case 3: // value.double_value + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Value = &GaugePoint_DoubleValue{math.Float64frombits(x)} + return true, err + default: + return false, nil + } +} + +func _GaugePoint_OneofSizer(msg proto.Message) (n int) { + m := msg.(*GaugePoint) + // value + switch x := m.Value.(type) { + case *GaugePoint_Int64Value: + n += proto.SizeVarint(2<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Int64Value)) + case *GaugePoint_DoubleValue: + n += proto.SizeVarint(3<<3 | proto.WireFixed64) + n += 8 + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +// Measurements accumulated over a time interval. +type CumulativePoint struct { + // This must be the same until an event resets the cumulative value to zero + // and sets a new start for the following points. + StartTime *google_protobuf.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime" json:"start_time,omitempty"` + // The end timestamp of the accumulated measurement. + EndTime *google_protobuf.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime" json:"end_time,omitempty"` + // The actual point value. + // + // Types that are valid to be assigned to Value: + // *CumulativePoint_Int64Value + // *CumulativePoint_DoubleValue + // *CumulativePoint_DistributionValue + Value isCumulativePoint_Value `protobuf_oneof:"value"` +} + +func (m *CumulativePoint) Reset() { *m = CumulativePoint{} } +func (m *CumulativePoint) String() string { return proto.CompactTextString(m) } +func (*CumulativePoint) ProtoMessage() {} +func (*CumulativePoint) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } + +type isCumulativePoint_Value interface { + isCumulativePoint_Value() +} + +type CumulativePoint_Int64Value struct { + Int64Value int64 `protobuf:"varint,3,opt,name=int64_value,json=int64Value,oneof"` +} +type CumulativePoint_DoubleValue struct { + DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,oneof"` +} +type CumulativePoint_DistributionValue struct { + DistributionValue *DistributionValue `protobuf:"bytes,5,opt,name=distribution_value,json=distributionValue,oneof"` +} + +func (*CumulativePoint_Int64Value) isCumulativePoint_Value() {} +func (*CumulativePoint_DoubleValue) isCumulativePoint_Value() {} +func (*CumulativePoint_DistributionValue) isCumulativePoint_Value() {} + +func (m *CumulativePoint) GetValue() isCumulativePoint_Value { + if m != nil { + return m.Value + } + return nil +} + +func (m *CumulativePoint) GetStartTime() *google_protobuf.Timestamp { + if m != nil { + return m.StartTime + } + return nil +} + +func (m *CumulativePoint) GetEndTime() *google_protobuf.Timestamp { + if m != nil { + return m.EndTime + } + return nil +} + +func (m *CumulativePoint) GetInt64Value() int64 { + if x, ok := m.GetValue().(*CumulativePoint_Int64Value); ok { + return x.Int64Value + } + return 0 +} + +func (m *CumulativePoint) GetDoubleValue() float64 { + if x, ok := m.GetValue().(*CumulativePoint_DoubleValue); ok { + return x.DoubleValue + } + return 0 +} + +func (m *CumulativePoint) GetDistributionValue() *DistributionValue { + if x, ok := m.GetValue().(*CumulativePoint_DistributionValue); ok { + return x.DistributionValue + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*CumulativePoint) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _CumulativePoint_OneofMarshaler, _CumulativePoint_OneofUnmarshaler, _CumulativePoint_OneofSizer, []interface{}{ + (*CumulativePoint_Int64Value)(nil), + (*CumulativePoint_DoubleValue)(nil), + (*CumulativePoint_DistributionValue)(nil), + } +} + +func _CumulativePoint_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*CumulativePoint) + // value + switch x := m.Value.(type) { + case *CumulativePoint_Int64Value: + b.EncodeVarint(3<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.Int64Value)) + case *CumulativePoint_DoubleValue: + b.EncodeVarint(4<<3 | proto.WireFixed64) + b.EncodeFixed64(math.Float64bits(x.DoubleValue)) + case *CumulativePoint_DistributionValue: + b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.DistributionValue); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("CumulativePoint.Value has unexpected type %T", x) + } + return nil +} + +func _CumulativePoint_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*CumulativePoint) + switch tag { + case 3: // value.int64_value + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.Value = &CumulativePoint_Int64Value{int64(x)} + return true, err + case 4: // value.double_value + if wire != proto.WireFixed64 { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeFixed64() + m.Value = &CumulativePoint_DoubleValue{math.Float64frombits(x)} + return true, err + case 5: // value.distribution_value + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(DistributionValue) + err := b.DecodeMessage(msg) + m.Value = &CumulativePoint_DistributionValue{msg} + return true, err + default: + return false, nil + } +} + +func _CumulativePoint_OneofSizer(msg proto.Message) (n int) { + m := msg.(*CumulativePoint) + // value + switch x := m.Value.(type) { + case *CumulativePoint_Int64Value: + n += proto.SizeVarint(3<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.Int64Value)) + case *CumulativePoint_DoubleValue: + n += proto.SizeVarint(4<<3 | proto.WireFixed64) + n += 8 + case *CumulativePoint_DistributionValue: + s := proto.Size(x.DistributionValue) + n += proto.SizeVarint(5<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +// 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 { + // 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" json:"count,omitempty"` + // The arithmetic mean of the values in the population. If count is zero + // then this field must be zero. + Mean float64 `protobuf:"fixed64,2,opt,name=mean" json:"mean,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" json:"sum_of_squared_deviation,omitempty"` + // If specified, contains the range of the population values. The field + // must not be present if the count is zero. + Range *DistributionValue_Range `protobuf:"bytes,4,opt,name=range" json:"range,omitempty"` + // A Distribution may optionally contain a histogram of the values in the + // population. The bucket boundaries for that histogram are described by + // bucket_bounds. This defines size(bucket_bounds) + 1 (= N) + // buckets. The boundaries for bucket index i are: + // + // (-infinity, bucket_bounds[i]) for i == 0 + // [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 + // [bucket_bounds[i-1], +infinity) for i == N-1 + // + // i.e. an underflow bucket (number 0), zero or more finite buckets (1 + // through N - 2, and an overflow bucket (N - 1), with inclusive lower + // bounds and exclusive upper bounds. + // + // If bucket_bounds has no elements (zero size), then there is no + // histogram associated with the Distribution. If bucket_bounds has only + // one element, there are no finite buckets, and that single element is the + // common boundary of the overflow and underflow buckets. The values must + // be monotonically increasing. + BucketBounds []float64 `protobuf:"fixed64,5,rep,packed,name=bucket_bounds,json=bucketBounds" json:"bucket_bounds,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,6,rep,name=buckets" json:"buckets,omitempty"` +} + +func (m *DistributionValue) Reset() { *m = DistributionValue{} } +func (m *DistributionValue) String() string { return proto.CompactTextString(m) } +func (*DistributionValue) ProtoMessage() {} +func (*DistributionValue) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } + +func (m *DistributionValue) GetCount() int64 { + if m != nil { + return m.Count + } + return 0 +} + +func (m *DistributionValue) GetMean() float64 { + if m != nil { + return m.Mean + } + return 0 +} + +func (m *DistributionValue) GetSumOfSquaredDeviation() float64 { + if m != nil { + return m.SumOfSquaredDeviation + } + return 0 +} + +func (m *DistributionValue) GetRange() *DistributionValue_Range { + if m != nil { + return m.Range + } + return nil +} + +func (m *DistributionValue) GetBucketBounds() []float64 { + if m != nil { + return m.BucketBounds + } + return nil +} + +func (m *DistributionValue) GetBuckets() []*DistributionValue_Bucket { + if m != nil { + return m.Buckets + } + return nil +} + +// The range of the population values. +type DistributionValue_Range struct { + // The minimum of the population values. + Min float64 `protobuf:"fixed64,1,opt,name=min" json:"min,omitempty"` + // The maximum of the population values. + Max float64 `protobuf:"fixed64,2,opt,name=max" json:"max,omitempty"` +} + +func (m *DistributionValue_Range) Reset() { *m = DistributionValue_Range{} } +func (m *DistributionValue_Range) String() string { return proto.CompactTextString(m) } +func (*DistributionValue_Range) ProtoMessage() {} +func (*DistributionValue_Range) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8, 0} } + +func (m *DistributionValue_Range) GetMin() float64 { + if m != nil { + return m.Min + } + return 0 +} + +func (m *DistributionValue_Range) GetMax() float64 { + if m != nil { + return m.Max + } + return 0 +} + +type DistributionValue_Bucket struct { + // The number of values in each bucket of the histogram, as described in + // bucket_bounds. + Count int64 `protobuf:"varint,1,opt,name=count" json:"count,omitempty"` +} + +func (m *DistributionValue_Bucket) Reset() { *m = DistributionValue_Bucket{} } +func (m *DistributionValue_Bucket) String() string { return proto.CompactTextString(m) } +func (*DistributionValue_Bucket) ProtoMessage() {} +func (*DistributionValue_Bucket) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8, 1} } + +func (m *DistributionValue_Bucket) GetCount() int64 { + if m != nil { + return m.Count + } + return 0 +} + +func init() { + proto.RegisterType((*MetricSet)(nil), "opencensus.proto.stats.metrics.MetricSet") + proto.RegisterType((*Metric)(nil), "opencensus.proto.stats.metrics.Metric") + proto.RegisterType((*MetricDescriptor)(nil), "opencensus.proto.stats.metrics.MetricDescriptor") + proto.RegisterType((*LabelKey)(nil), "opencensus.proto.stats.metrics.LabelKey") + proto.RegisterType((*TimeSeries)(nil), "opencensus.proto.stats.metrics.TimeSeries") + proto.RegisterType((*LabelValue)(nil), "opencensus.proto.stats.metrics.LabelValue") + proto.RegisterType((*GaugePoint)(nil), "opencensus.proto.stats.metrics.GaugePoint") + proto.RegisterType((*CumulativePoint)(nil), "opencensus.proto.stats.metrics.CumulativePoint") + proto.RegisterType((*DistributionValue)(nil), "opencensus.proto.stats.metrics.DistributionValue") + proto.RegisterType((*DistributionValue_Range)(nil), "opencensus.proto.stats.metrics.DistributionValue.Range") + proto.RegisterType((*DistributionValue_Bucket)(nil), "opencensus.proto.stats.metrics.DistributionValue.Bucket") + proto.RegisterEnum("opencensus.proto.stats.metrics.MetricDescriptor_Type", MetricDescriptor_Type_name, MetricDescriptor_Type_value) +} + +func init() { proto.RegisterFile("opencensus/proto/stats/metrics/metrics.proto", fileDescriptor0) } + +var fileDescriptor0 = []byte{ + // 843 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xdd, 0x6e, 0x23, 0x35, + 0x14, 0xee, 0xe4, 0xa7, 0x6d, 0xce, 0x94, 0xdd, 0xd4, 0x02, 0x69, 0xd4, 0x95, 0x96, 0x32, 0x2b, + 0xa1, 0x6a, 0xa1, 0x13, 0x08, 0x2c, 0xbb, 0xdc, 0x00, 0x9b, 0xb6, 0xb4, 0x85, 0x0d, 0x14, 0xb7, + 0xdd, 0x0b, 0x04, 0x1a, 0xcd, 0x8f, 0x3b, 0xb5, 0x3a, 0xe3, 0x09, 0x63, 0xbb, 0x22, 0x77, 0x5c, + 0x22, 0xf1, 0x00, 0xbc, 0x00, 0x6f, 0xc0, 0x0d, 0x8f, 0x87, 0x7c, 0x3c, 0xf9, 0x21, 0x5b, 0x91, + 0xf4, 0x2a, 0xc7, 0x9f, 0xcf, 0xf7, 0xf9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 0xc6, 0xc4, + 0x7e, 0x56, 0x7f, 0xe2, 0x2d, 0x52, 0xab, 0xdb, 0xd9, 0x5e, 0xc7, 0x9f, 0x4f, 0xfe, 0x0d, 0x00, + 0x00, 0xff, 0xff, 0x97, 0x6e, 0x37, 0xe3, 0x15, 0x08, 0x00, 0x00, +} diff --git a/gen-go/statsproto/stats.pb.go b/gen-go/statsproto/stats.pb.go index 39b7bcb..0ab410d 100644 --- a/gen-go/statsproto/stats.pb.go +++ b/gen-go/statsproto/stats.pb.go @@ -1,31 +1,28 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: stats.proto +// source: opencensus/proto/stats/stats.proto /* Package statsproto is a generated protocol buffer package. It is generated from these files: - stats.proto + opencensus/proto/stats/stats.proto It has these top-level messages: - MeasurementDescriptor - DistributionAggregation - DistributionAggregationDescriptor - IntervalAggregation - IntervalAggregationDescriptor Tag - ViewDescriptor - DistributionView - IntervalView + Measure View + CountAggregation + SumAggregation + LastValueAggregation + DistributionAggregation + Measurement */ package statsproto import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import google_protobuf "github.com/golang/protobuf/ptypes/duration" -import google_protobuf1 "github.com/golang/protobuf/ptypes/timestamp" +import google_protobuf "github.com/golang/protobuf/ptypes/timestamp" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal @@ -38,581 +35,321 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package -// Fundamental units of measurement supported by Census -// TODO(aveitch): expand this to include other S.I. units? -type MeasurementDescriptor_BasicUnit int32 +type Measure_Type int32 const ( - MeasurementDescriptor_UNKNOWN MeasurementDescriptor_BasicUnit = 0 - MeasurementDescriptor_SCALAR MeasurementDescriptor_BasicUnit = 1 - MeasurementDescriptor_BITS MeasurementDescriptor_BasicUnit = 2 - MeasurementDescriptor_BYTES MeasurementDescriptor_BasicUnit = 3 - MeasurementDescriptor_SECONDS MeasurementDescriptor_BasicUnit = 4 - MeasurementDescriptor_CORES MeasurementDescriptor_BasicUnit = 5 - MeasurementDescriptor_MAX_UNITS MeasurementDescriptor_BasicUnit = 6 + // Unknown type. + Measure_TYPE_UNSPECIFIED Measure_Type = 0 + // Indicates an int64 Measure. + Measure_INT64 Measure_Type = 1 + // Indicates a double Measure. + Measure_DOUBLE Measure_Type = 2 ) -var MeasurementDescriptor_BasicUnit_name = map[int32]string{ - 0: "UNKNOWN", - 1: "SCALAR", - 2: "BITS", - 3: "BYTES", - 4: "SECONDS", - 5: "CORES", - 6: "MAX_UNITS", +var Measure_Type_name = map[int32]string{ + 0: "TYPE_UNSPECIFIED", + 1: "INT64", + 2: "DOUBLE", } -var MeasurementDescriptor_BasicUnit_value = map[string]int32{ - "UNKNOWN": 0, - "SCALAR": 1, - "BITS": 2, - "BYTES": 3, - "SECONDS": 4, - "CORES": 5, - "MAX_UNITS": 6, +var Measure_Type_value = map[string]int32{ + "TYPE_UNSPECIFIED": 0, + "INT64": 1, + "DOUBLE": 2, } -func (x MeasurementDescriptor_BasicUnit) String() string { - return proto.EnumName(MeasurementDescriptor_BasicUnit_name, int32(x)) -} -func (MeasurementDescriptor_BasicUnit) EnumDescriptor() ([]byte, []int) { - return fileDescriptor0, []int{0, 0} +func (x Measure_Type) String() string { + return proto.EnumName(Measure_Type_name, int32(x)) } +func (Measure_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{1, 0} } -// MeasurementDescriptor describes a data point (measurement) type. -type MeasurementDescriptor struct { - // A descriptive name, e.g. rpc_latency, cpu. Must be unique. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // More detailed description of the resource, used in documentation. - Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` - // The units used by this type of measurement. - Unit *MeasurementDescriptor_MeasurementUnit `protobuf:"bytes,3,opt,name=unit" json:"unit,omitempty"` +// TODO(bdrutu): Consider if this should be moved to a "tags" directory to match the API structure. +type Tag struct { + Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` } -func (m *MeasurementDescriptor) Reset() { *m = MeasurementDescriptor{} } -func (m *MeasurementDescriptor) String() string { return proto.CompactTextString(m) } -func (*MeasurementDescriptor) ProtoMessage() {} -func (*MeasurementDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (m *Tag) Reset() { *m = Tag{} } +func (m *Tag) String() string { return proto.CompactTextString(m) } +func (*Tag) ProtoMessage() {} +func (*Tag) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } -func (m *MeasurementDescriptor) GetName() string { +func (m *Tag) GetKey() string { if m != nil { - return m.Name + return m.Key } return "" } -func (m *MeasurementDescriptor) GetDescription() string { +func (m *Tag) GetValue() string { if m != nil { - return m.Description + return m.Value } return "" } -func (m *MeasurementDescriptor) GetUnit() *MeasurementDescriptor_MeasurementUnit { - if m != nil { - return m.Unit - } - return nil -} - -// MeasurementUnit lets you build compound units of the form -// 10^n * (A * B * ...) / (X * Y * ...), -// where the elements in the numerator and denominator are all BasicUnits. A -// MeasurementUnit must have at least one BasicUnit in its numerator. -// -// To specify multiplication in the numerator or denominator, simply specify -// multiple numerator or denominator fields. For example: -// -// - byte-seconds (i.e. bytes * seconds): -// numerator: BYTES -// numerator: SECS -// -// - events/sec^2 (i.e. rate of change of events/sec): -// numerator: SCALAR -// denominator: SECS -// denominator: SECS -// -// To specify multiples (in power of 10) of units, specify a non-zero -// 'power10' value, for example: -// -// - MB/s (i.e. megabytes / s): -// power10: 6 -// numerator: BYTES -// denominator: SECS -// -// - nanoseconds -// power10: -9 -// numerator: SECS -type MeasurementDescriptor_MeasurementUnit struct { - Power10 int32 `protobuf:"varint,1,opt,name=power10" json:"power10,omitempty"` - Numerators []MeasurementDescriptor_BasicUnit `protobuf:"varint,2,rep,packed,name=numerators,enum=opencensus.proto.stats.MeasurementDescriptor_BasicUnit" json:"numerators,omitempty"` - Denominators []MeasurementDescriptor_BasicUnit `protobuf:"varint,3,rep,packed,name=denominators,enum=opencensus.proto.stats.MeasurementDescriptor_BasicUnit" json:"denominators,omitempty"` -} - -func (m *MeasurementDescriptor_MeasurementUnit) Reset() { *m = MeasurementDescriptor_MeasurementUnit{} } -func (m *MeasurementDescriptor_MeasurementUnit) String() string { return proto.CompactTextString(m) } -func (*MeasurementDescriptor_MeasurementUnit) ProtoMessage() {} -func (*MeasurementDescriptor_MeasurementUnit) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{0, 0} -} - -func (m *MeasurementDescriptor_MeasurementUnit) GetPower10() int32 { - if m != nil { - return m.Power10 - } - return 0 -} - -func (m *MeasurementDescriptor_MeasurementUnit) GetNumerators() []MeasurementDescriptor_BasicUnit { - if m != nil { - return m.Numerators - } - return nil -} - -func (m *MeasurementDescriptor_MeasurementUnit) GetDenominators() []MeasurementDescriptor_BasicUnit { - if m != nil { - return m.Denominators - } - return nil -} - -// DistributionAggregation contains summary statistics for a population of -// values and, optionally, a histogram representing the distribution of those -// values across a specified set of histogram buckets, as defined in -// DistributionAggregationDescriptor.bucket_bounds. -// -// The summary statistics are the count, mean, minimum, and the maximum of the -// set of population of values. -// -// Although it is not forbidden, it is generally a bad idea to include -// non-finite values (infinities or NaNs) in the population of values, as this -// will render the `mean` field meaningless. -type DistributionAggregation struct { - // The number of values in the population. Must be non-negative. - Count int64 `protobuf:"varint,1,opt,name=count" json:"count,omitempty"` - // The arithmetic mean of the values in the population. If `count` is zero - // then this field must be zero. - Mean float64 `protobuf:"fixed64,2,opt,name=mean" json:"mean,omitempty"` - // The sum of the values in the population. If `count` is zero then this - // field must be zero. - Sum float64 `protobuf:"fixed64,3,opt,name=sum" json:"sum,omitempty"` - // The range of the population values. If `count` is zero, this field will not - // be defined. - Range *DistributionAggregation_Range `protobuf:"bytes,4,opt,name=range" json:"range,omitempty"` - // A Distribution may optionally contain a histogram of the values in the - // population. The histogram is given in `bucket_count` as counts of values - // that fall into one of a sequence of non-overlapping buckets, as described - // by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - // values in `bucket_counts` must equal the value in `count`. - // - // Bucket counts are given in order under the numbering scheme described - // above (the underflow bucket has number 0; the finite buckets, if any, - // have numbers 1 through N-2; the overflow bucket has number N-1). - // - // The size of `bucket_count` must be no greater than N as defined in - // `bucket_boundaries`. - // - // Any suffix of trailing zero bucket_count fields may be omitted. - BucketCounts []int64 `protobuf:"varint,5,rep,packed,name=bucket_counts,json=bucketCounts" json:"bucket_counts,omitempty"` - // Tags associated with this DistributionAggregation. These will be filled - // in based on the View specification. - Tags []*Tag `protobuf:"bytes,6,rep,name=tags" json:"tags,omitempty"` -} - -func (m *DistributionAggregation) Reset() { *m = DistributionAggregation{} } -func (m *DistributionAggregation) String() string { return proto.CompactTextString(m) } -func (*DistributionAggregation) ProtoMessage() {} -func (*DistributionAggregation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } - -func (m *DistributionAggregation) GetCount() int64 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *DistributionAggregation) GetMean() float64 { - if m != nil { - return m.Mean - } - return 0 -} - -func (m *DistributionAggregation) GetSum() float64 { - if m != nil { - return m.Sum - } - return 0 +// Measure . +type Measure struct { + // A string by which the measure will be referred to, e.g. "rpc_server_latency". Names MUST be + // unique within the library. + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Describes the measure, e.g. "RPC latency in seconds". + Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` + // Describes the unit used for the Measure. Follows the format described by + // http://unitsofmeasure.org/ucum.html. + Unit string `protobuf:"bytes,3,opt,name=unit" json:"unit,omitempty"` + // The type used for this Measure. + Type Measure_Type `protobuf:"varint,4,opt,name=type,enum=opencensus.proto.stats.Measure_Type" json:"type,omitempty"` } -func (m *DistributionAggregation) GetRange() *DistributionAggregation_Range { - if m != nil { - return m.Range - } - return nil -} +func (m *Measure) Reset() { *m = Measure{} } +func (m *Measure) String() string { return proto.CompactTextString(m) } +func (*Measure) ProtoMessage() {} +func (*Measure) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } -func (m *DistributionAggregation) GetBucketCounts() []int64 { +func (m *Measure) GetName() string { if m != nil { - return m.BucketCounts + return m.Name } - return nil + return "" } -func (m *DistributionAggregation) GetTags() []*Tag { +func (m *Measure) GetDescription() string { if m != nil { - return m.Tags + return m.Description } - return nil -} - -// Describes a range of population values. -type DistributionAggregation_Range struct { - // The minimum of the population values. - Min float64 `protobuf:"fixed64,1,opt,name=min" json:"min,omitempty"` - // The maximum of the population values. - Max float64 `protobuf:"fixed64,2,opt,name=max" json:"max,omitempty"` -} - -func (m *DistributionAggregation_Range) Reset() { *m = DistributionAggregation_Range{} } -func (m *DistributionAggregation_Range) String() string { return proto.CompactTextString(m) } -func (*DistributionAggregation_Range) ProtoMessage() {} -func (*DistributionAggregation_Range) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{1, 0} + return "" } -func (m *DistributionAggregation_Range) GetMin() float64 { +func (m *Measure) GetUnit() string { if m != nil { - return m.Min + return m.Unit } - return 0 + return "" } -func (m *DistributionAggregation_Range) GetMax() float64 { +func (m *Measure) GetType() Measure_Type { if m != nil { - return m.Max + return m.Type } - return 0 + return Measure_TYPE_UNSPECIFIED } -type DistributionAggregationDescriptor struct { - // A Distribution may optionally contain a histogram of the values in the - // population. The bucket boundaries for that histogram are described by - // `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - // buckets. The boundaries for bucket index i are: - // - // [-infinity, bucket_bounds[i]) for i == 0 - // [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - // [bucket_bounds[i-1], +infinity) for i == N-1 - // - // i.e. an underflow bucket (number 0), zero or more finite buckets (1 - // through N - 2, and an overflow bucket (N - 1), with inclusive lower - // bounds and exclusive upper bounds. +type View struct { + // A string by which the View will be referred to, e.g. "rpc_latency". Names MUST be unique + // within the library. + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Describes the view, e.g. "RPC latency distribution" + Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` + // The Measure to which this view is applied. + Measure *Measure `protobuf:"bytes,3,opt,name=measure" json:"measure,omitempty"` + // An array of tag keys. These values associated with tags of this name form the basis by which + // individual stats will be aggregated (one aggregation per unique tag value). If none are + // provided, then all data is recorded in a single aggregation. + Columns []string `protobuf:"bytes,4,rep,name=columns" json:"columns,omitempty"` + // The description of the aggregation used for this view which describes how data collected are + // aggregated. // - // If `bucket_bounds` has no elements (zero size), then there is no - // histogram associated with the Distribution. If `bucket_bounds` has only - // one element, there are no finite buckets, and that single element is the - // common boundary of the overflow and underflow buckets. The values must - // be monotonically increasing. - BucketBounds []float64 `protobuf:"fixed64,1,rep,packed,name=bucket_bounds,json=bucketBounds" json:"bucket_bounds,omitempty"` -} - -func (m *DistributionAggregationDescriptor) Reset() { *m = DistributionAggregationDescriptor{} } -func (m *DistributionAggregationDescriptor) String() string { return proto.CompactTextString(m) } -func (*DistributionAggregationDescriptor) ProtoMessage() {} -func (*DistributionAggregationDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor0, []int{2} -} - -func (m *DistributionAggregationDescriptor) GetBucketBounds() []float64 { - if m != nil { - return m.BucketBounds - } - return nil -} - -// An IntervalAggreation records summary stats over various time -// windows. These stats are approximate, with the degree of accuracy -// controlled by setting the n_sub_intervals parameter in the -// IntervalAggregationDescriptor. -type IntervalAggregation struct { - // Full set of intervals for this aggregation. - Intervals []*IntervalAggregation_Interval `protobuf:"bytes,1,rep,name=intervals" json:"intervals,omitempty"` - // Tags associated with this IntervalAggregation. These will be filled in - // based on the View specification. - Tags []*Tag `protobuf:"bytes,2,rep,name=tags" json:"tags,omitempty"` + // Types that are valid to be assigned to Aggregation: + // *View_CountAggregation + // *View_SumAggregation + // *View_LastValueAggregation + // *View_DistributionAggregation + Aggregation isView_Aggregation `protobuf_oneof:"aggregation"` } -func (m *IntervalAggregation) Reset() { *m = IntervalAggregation{} } -func (m *IntervalAggregation) String() string { return proto.CompactTextString(m) } -func (*IntervalAggregation) ProtoMessage() {} -func (*IntervalAggregation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } - -func (m *IntervalAggregation) GetIntervals() []*IntervalAggregation_Interval { - if m != nil { - return m.Intervals - } - return nil -} +func (m *View) Reset() { *m = View{} } +func (m *View) String() string { return proto.CompactTextString(m) } +func (*View) ProtoMessage() {} +func (*View) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } -func (m *IntervalAggregation) GetTags() []*Tag { - if m != nil { - return m.Tags - } - return nil +type isView_Aggregation interface { + isView_Aggregation() } -// Summary statistic over a single time interval. -type IntervalAggregation_Interval struct { - // The interval duration. Must be positive. - IntervalSize *google_protobuf.Duration `protobuf:"bytes,1,opt,name=interval_size,json=intervalSize" json:"interval_size,omitempty"` - // Approximate number of measurements recorded in this interval. - Count float64 `protobuf:"fixed64,2,opt,name=count" json:"count,omitempty"` - // The cumulative sum of measurements in this interval. - Sum float64 `protobuf:"fixed64,3,opt,name=sum" json:"sum,omitempty"` +type View_CountAggregation struct { + CountAggregation *CountAggregation `protobuf:"bytes,5,opt,name=count_aggregation,json=countAggregation,oneof"` } - -func (m *IntervalAggregation_Interval) Reset() { *m = IntervalAggregation_Interval{} } -func (m *IntervalAggregation_Interval) String() string { return proto.CompactTextString(m) } -func (*IntervalAggregation_Interval) ProtoMessage() {} -func (*IntervalAggregation_Interval) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3, 0} } - -func (m *IntervalAggregation_Interval) GetIntervalSize() *google_protobuf.Duration { - if m != nil { - return m.IntervalSize - } - return nil +type View_SumAggregation struct { + SumAggregation *SumAggregation `protobuf:"bytes,6,opt,name=sum_aggregation,json=sumAggregation,oneof"` } - -func (m *IntervalAggregation_Interval) GetCount() float64 { - if m != nil { - return m.Count - } - return 0 +type View_LastValueAggregation struct { + LastValueAggregation *LastValueAggregation `protobuf:"bytes,7,opt,name=last_value_aggregation,json=lastValueAggregation,oneof"` } - -func (m *IntervalAggregation_Interval) GetSum() float64 { - if m != nil { - return m.Sum - } - return 0 +type View_DistributionAggregation struct { + DistributionAggregation *DistributionAggregation `protobuf:"bytes,8,opt,name=distribution_aggregation,json=distributionAggregation,oneof"` } -// An IntervalAggreationDescriptor specifies time intervals for an -// IntervalAggregation. -type IntervalAggregationDescriptor struct { - // Number of internal sub-intervals to use when collecting stats for each - // interval. The max error in interval measurements will be approximately - // 1/n_sub_intervals (although in practice, this will only be approached in - // the presence of very large and bursty workload changes), and underlying - // memory usage will be roughly proportional to the value of this - // field. Must be in the range [2, 20]. A value of 5 will be used if this is - // unspecified. - NSubIntervals int32 `protobuf:"varint,1,opt,name=n_sub_intervals,json=nSubIntervals" json:"n_sub_intervals,omitempty"` - // The size of each interval, as a time duration. Must have at least one - // element. - IntervalSizes []*google_protobuf.Duration `protobuf:"bytes,2,rep,name=interval_sizes,json=intervalSizes" json:"interval_sizes,omitempty"` -} - -func (m *IntervalAggregationDescriptor) Reset() { *m = IntervalAggregationDescriptor{} } -func (m *IntervalAggregationDescriptor) String() string { return proto.CompactTextString(m) } -func (*IntervalAggregationDescriptor) ProtoMessage() {} -func (*IntervalAggregationDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } - -func (m *IntervalAggregationDescriptor) GetNSubIntervals() int32 { - if m != nil { - return m.NSubIntervals - } - return 0 -} +func (*View_CountAggregation) isView_Aggregation() {} +func (*View_SumAggregation) isView_Aggregation() {} +func (*View_LastValueAggregation) isView_Aggregation() {} +func (*View_DistributionAggregation) isView_Aggregation() {} -func (m *IntervalAggregationDescriptor) GetIntervalSizes() []*google_protobuf.Duration { +func (m *View) GetAggregation() isView_Aggregation { if m != nil { - return m.IntervalSizes + return m.Aggregation } return nil } -// A Tag: key-value pair. -// Both strings must be printable ASCII. -type Tag struct { - Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` -} - -func (m *Tag) Reset() { *m = Tag{} } -func (m *Tag) String() string { return proto.CompactTextString(m) } -func (*Tag) ProtoMessage() {} -func (*Tag) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } - -func (m *Tag) GetKey() string { +func (m *View) GetName() string { if m != nil { - return m.Key + return m.Name } return "" } -func (m *Tag) GetValue() string { +func (m *View) GetDescription() string { if m != nil { - return m.Value + return m.Description } return "" } -// A ViewDescriptor specifies an AggregationDescriptor and a set of tag -// keys. Views instantiated from this descriptor will contain Aggregations -// broken down by the unique set of matching tag values for each measurement. -type ViewDescriptor struct { - // Name of view. Must be unique. - Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - // More detailed description, for documentation purposes. - Description string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` - // Name of a MeasurementDescriptor to be used for this view. - MeasurementDescriptorName string `protobuf:"bytes,3,opt,name=measurement_descriptor_name,json=measurementDescriptorName" json:"measurement_descriptor_name,omitempty"` - // Aggregation type to associate with View. - // - // Types that are valid to be assigned to Aggregation: - // *ViewDescriptor_IntervalAggregation - // *ViewDescriptor_DistributionAggregation - Aggregation isViewDescriptor_Aggregation `protobuf_oneof:"aggregation"` - // Tag keys to match with a given measurement. If no keys are specified, - // then all stats are recorded. Keys must be unique. - TagKeys []string `protobuf:"bytes,6,rep,name=tag_keys,json=tagKeys" json:"tag_keys,omitempty"` -} - -func (m *ViewDescriptor) Reset() { *m = ViewDescriptor{} } -func (m *ViewDescriptor) String() string { return proto.CompactTextString(m) } -func (*ViewDescriptor) ProtoMessage() {} -func (*ViewDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } - -type isViewDescriptor_Aggregation interface { - isViewDescriptor_Aggregation() -} - -type ViewDescriptor_IntervalAggregation struct { - IntervalAggregation *IntervalAggregationDescriptor `protobuf:"bytes,4,opt,name=interval_aggregation,json=intervalAggregation,oneof"` -} -type ViewDescriptor_DistributionAggregation struct { - DistributionAggregation *DistributionAggregationDescriptor `protobuf:"bytes,5,opt,name=distribution_aggregation,json=distributionAggregation,oneof"` -} - -func (*ViewDescriptor_IntervalAggregation) isViewDescriptor_Aggregation() {} -func (*ViewDescriptor_DistributionAggregation) isViewDescriptor_Aggregation() {} - -func (m *ViewDescriptor) GetAggregation() isViewDescriptor_Aggregation { +func (m *View) GetMeasure() *Measure { if m != nil { - return m.Aggregation + return m.Measure } return nil } -func (m *ViewDescriptor) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ViewDescriptor) GetDescription() string { +func (m *View) GetColumns() []string { if m != nil { - return m.Description + return m.Columns } - return "" + return nil } -func (m *ViewDescriptor) GetMeasurementDescriptorName() string { - if m != nil { - return m.MeasurementDescriptorName +func (m *View) GetCountAggregation() *CountAggregation { + if x, ok := m.GetAggregation().(*View_CountAggregation); ok { + return x.CountAggregation } - return "" + return nil } -func (m *ViewDescriptor) GetIntervalAggregation() *IntervalAggregationDescriptor { - if x, ok := m.GetAggregation().(*ViewDescriptor_IntervalAggregation); ok { - return x.IntervalAggregation +func (m *View) GetSumAggregation() *SumAggregation { + if x, ok := m.GetAggregation().(*View_SumAggregation); ok { + return x.SumAggregation } return nil } -func (m *ViewDescriptor) GetDistributionAggregation() *DistributionAggregationDescriptor { - if x, ok := m.GetAggregation().(*ViewDescriptor_DistributionAggregation); ok { - return x.DistributionAggregation +func (m *View) GetLastValueAggregation() *LastValueAggregation { + if x, ok := m.GetAggregation().(*View_LastValueAggregation); ok { + return x.LastValueAggregation } return nil } -func (m *ViewDescriptor) GetTagKeys() []string { - if m != nil { - return m.TagKeys +func (m *View) GetDistributionAggregation() *DistributionAggregation { + if x, ok := m.GetAggregation().(*View_DistributionAggregation); ok { + return x.DistributionAggregation } return nil } // XXX_OneofFuncs is for the internal use of the proto package. -func (*ViewDescriptor) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ViewDescriptor_OneofMarshaler, _ViewDescriptor_OneofUnmarshaler, _ViewDescriptor_OneofSizer, []interface{}{ - (*ViewDescriptor_IntervalAggregation)(nil), - (*ViewDescriptor_DistributionAggregation)(nil), +func (*View) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _View_OneofMarshaler, _View_OneofUnmarshaler, _View_OneofSizer, []interface{}{ + (*View_CountAggregation)(nil), + (*View_SumAggregation)(nil), + (*View_LastValueAggregation)(nil), + (*View_DistributionAggregation)(nil), } } -func _ViewDescriptor_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ViewDescriptor) +func _View_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*View) // aggregation switch x := m.Aggregation.(type) { - case *ViewDescriptor_IntervalAggregation: - b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.IntervalAggregation); err != nil { + case *View_CountAggregation: + b.EncodeVarint(5<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.CountAggregation); err != nil { return err } - case *ViewDescriptor_DistributionAggregation: - b.EncodeVarint(5<<3 | proto.WireBytes) + case *View_SumAggregation: + b.EncodeVarint(6<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.SumAggregation); err != nil { + return err + } + case *View_LastValueAggregation: + b.EncodeVarint(7<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.LastValueAggregation); err != nil { + return err + } + case *View_DistributionAggregation: + b.EncodeVarint(8<<3 | proto.WireBytes) if err := b.EncodeMessage(x.DistributionAggregation); err != nil { return err } case nil: default: - return fmt.Errorf("ViewDescriptor.Aggregation has unexpected type %T", x) + return fmt.Errorf("View.Aggregation has unexpected type %T", x) } return nil } -func _ViewDescriptor_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ViewDescriptor) +func _View_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*View) switch tag { - case 4: // aggregation.interval_aggregation + case 5: // aggregation.count_aggregation if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } - msg := new(IntervalAggregationDescriptor) + msg := new(CountAggregation) err := b.DecodeMessage(msg) - m.Aggregation = &ViewDescriptor_IntervalAggregation{msg} + m.Aggregation = &View_CountAggregation{msg} return true, err - case 5: // aggregation.distribution_aggregation + case 6: // aggregation.sum_aggregation if wire != proto.WireBytes { return true, proto.ErrInternalBadWireType } - msg := new(DistributionAggregationDescriptor) + msg := new(SumAggregation) err := b.DecodeMessage(msg) - m.Aggregation = &ViewDescriptor_DistributionAggregation{msg} + m.Aggregation = &View_SumAggregation{msg} + return true, err + case 7: // aggregation.last_value_aggregation + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(LastValueAggregation) + err := b.DecodeMessage(msg) + m.Aggregation = &View_LastValueAggregation{msg} + return true, err + case 8: // aggregation.distribution_aggregation + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(DistributionAggregation) + err := b.DecodeMessage(msg) + m.Aggregation = &View_DistributionAggregation{msg} return true, err default: return false, nil } } -func _ViewDescriptor_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ViewDescriptor) +func _View_OneofSizer(msg proto.Message) (n int) { + m := msg.(*View) // aggregation switch x := m.Aggregation.(type) { - case *ViewDescriptor_IntervalAggregation: - s := proto.Size(x.IntervalAggregation) - n += proto.SizeVarint(4<<3 | proto.WireBytes) + case *View_CountAggregation: + s := proto.Size(x.CountAggregation) + n += proto.SizeVarint(5<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *View_SumAggregation: + s := proto.Size(x.SumAggregation) + n += proto.SizeVarint(6<<3 | proto.WireBytes) + n += proto.SizeVarint(uint64(s)) + n += s + case *View_LastValueAggregation: + s := proto.Size(x.LastValueAggregation) + n += proto.SizeVarint(7<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s - case *ViewDescriptor_DistributionAggregation: + case *View_DistributionAggregation: s := proto.Size(x.DistributionAggregation) - n += proto.SizeVarint(5<<3 | proto.WireBytes) + n += proto.SizeVarint(8<<3 | proto.WireBytes) n += proto.SizeVarint(uint64(s)) n += s case nil: @@ -622,187 +359,198 @@ func _ViewDescriptor_OneofSizer(msg proto.Message) (n int) { return n } -// DistributionView contains all aggregations for a view specified using a -// DistributionAggregationDescriptor. -type DistributionView struct { - // Aggregations - each will have a unique set of tag values for the tag_keys - // associated with the corresponding View. - Aggregations []*DistributionAggregation `protobuf:"bytes,1,rep,name=aggregations" json:"aggregations,omitempty"` - // Start and end timestamps over which aggregations was accumulated. - Start *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=start" json:"start,omitempty"` - End *google_protobuf1.Timestamp `protobuf:"bytes,3,opt,name=end" json:"end,omitempty"` +type CountAggregation struct { } -func (m *DistributionView) Reset() { *m = DistributionView{} } -func (m *DistributionView) String() string { return proto.CompactTextString(m) } -func (*DistributionView) ProtoMessage() {} -func (*DistributionView) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (m *CountAggregation) Reset() { *m = CountAggregation{} } +func (m *CountAggregation) String() string { return proto.CompactTextString(m) } +func (*CountAggregation) ProtoMessage() {} +func (*CountAggregation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } -func (m *DistributionView) GetAggregations() []*DistributionAggregation { - if m != nil { - return m.Aggregations - } - return nil +type SumAggregation struct { } -func (m *DistributionView) GetStart() *google_protobuf1.Timestamp { - if m != nil { - return m.Start - } - return nil -} +func (m *SumAggregation) Reset() { *m = SumAggregation{} } +func (m *SumAggregation) String() string { return proto.CompactTextString(m) } +func (*SumAggregation) ProtoMessage() {} +func (*SumAggregation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } -func (m *DistributionView) GetEnd() *google_protobuf1.Timestamp { - if m != nil { - return m.End - } - return nil +type LastValueAggregation struct { } -// IntervalView contains all aggregations for a view specified using a -// IntervalAggregationDescriptor. -type IntervalView struct { - // Aggregations - each will have a unique set of tag values for the tag_keys - // associated with the corresponding View. - Aggregations []*IntervalAggregation `protobuf:"bytes,1,rep,name=aggregations" json:"aggregations,omitempty"` +func (m *LastValueAggregation) Reset() { *m = LastValueAggregation{} } +func (m *LastValueAggregation) String() string { return proto.CompactTextString(m) } +func (*LastValueAggregation) ProtoMessage() {} +func (*LastValueAggregation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +type DistributionAggregation struct { + // A Distribution may optionally contain a histogram of the values in the + // population. The bucket boundaries for that histogram are described by + // `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) + // buckets. The boundaries for bucket index i are: + // + // (-infinity, bucket_bounds[i]) for i == 0 + // [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 + // [bucket_bounds[i-1], +infinity) for i == N-1 + // + // i.e. an underflow bucket (number 0), zero or more finite buckets (1 + // through N - 2, and an overflow bucket (N - 1), with inclusive lower + // bounds and exclusive upper bounds. + // + // If `bucket_bounds` has no elements (zero size), then there is no + // histogram associated with the Distribution. If `bucket_bounds` has only + // one element, there are no finite buckets, and that single element is the + // common boundary of the overflow and underflow buckets. The values must + // be monotonically increasing. + BucketBounds []float64 `protobuf:"fixed64,1,rep,packed,name=bucket_bounds,json=bucketBounds" json:"bucket_bounds,omitempty"` } -func (m *IntervalView) Reset() { *m = IntervalView{} } -func (m *IntervalView) String() string { return proto.CompactTextString(m) } -func (*IntervalView) ProtoMessage() {} -func (*IntervalView) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (m *DistributionAggregation) Reset() { *m = DistributionAggregation{} } +func (m *DistributionAggregation) String() string { return proto.CompactTextString(m) } +func (*DistributionAggregation) ProtoMessage() {} +func (*DistributionAggregation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } -func (m *IntervalView) GetAggregations() []*IntervalAggregation { +func (m *DistributionAggregation) GetBucketBounds() []float64 { if m != nil { - return m.Aggregations + return m.BucketBounds } return nil } -// A View contains the aggregations based on a ViewDescriptor. -type View struct { - // ViewDescriptor name associated with this set of View. - ViewName string `protobuf:"bytes,1,opt,name=view_name,json=viewName" json:"view_name,omitempty"` - // Types that are valid to be assigned to View: - // *View_DistributionView - // *View_IntervalView - View isView_View `protobuf_oneof:"view"` +// Describes a data point to be collected for a Measure. +type Measurement struct { + Tags []*Tag `protobuf:"bytes,1,rep,name=tags" json:"tags,omitempty"` + // The name of the measure to which the value is applied. + MeasureName string `protobuf:"bytes,2,opt,name=measure_name,json=measureName" json:"measure_name,omitempty"` + // The recorded value, MUST have the appropriate type to match the Measure. + // + // Types that are valid to be assigned to Value: + // *Measurement_DoubleValue + // *Measurement_IntValue + Value isMeasurement_Value `protobuf_oneof:"value"` + // The time when this measurement was recorded. If the implementation uses a async buffer to + // record measurements this may be the time when the measurement was read from the buffer. + Time *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=time" json:"time,omitempty"` } -func (m *View) Reset() { *m = View{} } -func (m *View) String() string { return proto.CompactTextString(m) } -func (*View) ProtoMessage() {} -func (*View) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (m *Measurement) Reset() { *m = Measurement{} } +func (m *Measurement) String() string { return proto.CompactTextString(m) } +func (*Measurement) ProtoMessage() {} +func (*Measurement) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } -type isView_View interface { - isView_View() +type isMeasurement_Value interface { + isMeasurement_Value() } -type View_DistributionView struct { - DistributionView *DistributionView `protobuf:"bytes,2,opt,name=distribution_view,json=distributionView,oneof"` +type Measurement_DoubleValue struct { + DoubleValue float64 `protobuf:"fixed64,3,opt,name=double_value,json=doubleValue,oneof"` } -type View_IntervalView struct { - IntervalView *IntervalView `protobuf:"bytes,3,opt,name=interval_view,json=intervalView,oneof"` +type Measurement_IntValue struct { + IntValue int64 `protobuf:"varint,4,opt,name=int_value,json=intValue,oneof"` } -func (*View_DistributionView) isView_View() {} -func (*View_IntervalView) isView_View() {} +func (*Measurement_DoubleValue) isMeasurement_Value() {} +func (*Measurement_IntValue) isMeasurement_Value() {} -func (m *View) GetView() isView_View { +func (m *Measurement) GetValue() isMeasurement_Value { if m != nil { - return m.View + return m.Value } return nil } -func (m *View) GetViewName() string { +func (m *Measurement) GetTags() []*Tag { if m != nil { - return m.ViewName + return m.Tags + } + return nil +} + +func (m *Measurement) GetMeasureName() string { + if m != nil { + return m.MeasureName } return "" } -func (m *View) GetDistributionView() *DistributionView { - if x, ok := m.GetView().(*View_DistributionView); ok { - return x.DistributionView +func (m *Measurement) GetDoubleValue() float64 { + if x, ok := m.GetValue().(*Measurement_DoubleValue); ok { + return x.DoubleValue } - return nil + return 0 } -func (m *View) GetIntervalView() *IntervalView { - if x, ok := m.GetView().(*View_IntervalView); ok { - return x.IntervalView +func (m *Measurement) GetIntValue() int64 { + if x, ok := m.GetValue().(*Measurement_IntValue); ok { + return x.IntValue } - return nil + return 0 } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*View) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _View_OneofMarshaler, _View_OneofUnmarshaler, _View_OneofSizer, []interface{}{ - (*View_DistributionView)(nil), - (*View_IntervalView)(nil), +func (m *Measurement) GetTime() *google_protobuf.Timestamp { + if m != nil { + return m.Time } + return nil } -func _View_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*View) - // view - switch x := m.View.(type) { - case *View_DistributionView: - b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.DistributionView); err != nil { - return err - } - case *View_IntervalView: - b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.IntervalView); err != nil { - return err - } +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Measurement) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Measurement_OneofMarshaler, _Measurement_OneofUnmarshaler, _Measurement_OneofSizer, []interface{}{ + (*Measurement_DoubleValue)(nil), + (*Measurement_IntValue)(nil), + } +} + +func _Measurement_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Measurement) + // value + switch x := m.Value.(type) { + case *Measurement_DoubleValue: + b.EncodeVarint(3<<3 | proto.WireFixed64) + b.EncodeFixed64(math.Float64bits(x.DoubleValue)) + case *Measurement_IntValue: + b.EncodeVarint(4<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.IntValue)) case nil: default: - return fmt.Errorf("View.View has unexpected type %T", x) + return fmt.Errorf("Measurement.Value has unexpected type %T", x) } return nil } -func _View_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*View) +func _Measurement_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Measurement) switch tag { - case 2: // view.distribution_view - if wire != proto.WireBytes { + case 3: // value.double_value + if wire != proto.WireFixed64 { return true, proto.ErrInternalBadWireType } - msg := new(DistributionView) - err := b.DecodeMessage(msg) - m.View = &View_DistributionView{msg} + x, err := b.DecodeFixed64() + m.Value = &Measurement_DoubleValue{math.Float64frombits(x)} return true, err - case 3: // view.interval_view - if wire != proto.WireBytes { + case 4: // value.int_value + if wire != proto.WireVarint { return true, proto.ErrInternalBadWireType } - msg := new(IntervalView) - err := b.DecodeMessage(msg) - m.View = &View_IntervalView{msg} + x, err := b.DecodeVarint() + m.Value = &Measurement_IntValue{int64(x)} return true, err default: return false, nil } } -func _View_OneofSizer(msg proto.Message) (n int) { - m := msg.(*View) - // view - switch x := m.View.(type) { - case *View_DistributionView: - s := proto.Size(x.DistributionView) - n += proto.SizeVarint(2<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s - case *View_IntervalView: - s := proto.Size(x.IntervalView) - n += proto.SizeVarint(3<<3 | proto.WireBytes) - n += proto.SizeVarint(uint64(s)) - n += s +func _Measurement_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Measurement) + // value + switch x := m.Value.(type) { + case *Measurement_DoubleValue: + n += proto.SizeVarint(3<<3 | proto.WireFixed64) + n += 8 + case *Measurement_IntValue: + n += proto.SizeVarint(4<<3 | proto.WireVarint) + n += proto.SizeVarint(uint64(x.IntValue)) case nil: default: panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) @@ -811,82 +559,59 @@ func _View_OneofSizer(msg proto.Message) (n int) { } func init() { - proto.RegisterType((*MeasurementDescriptor)(nil), "opencensus.proto.stats.MeasurementDescriptor") - proto.RegisterType((*MeasurementDescriptor_MeasurementUnit)(nil), "opencensus.proto.stats.MeasurementDescriptor.MeasurementUnit") - proto.RegisterType((*DistributionAggregation)(nil), "opencensus.proto.stats.DistributionAggregation") - proto.RegisterType((*DistributionAggregation_Range)(nil), "opencensus.proto.stats.DistributionAggregation.Range") - proto.RegisterType((*DistributionAggregationDescriptor)(nil), "opencensus.proto.stats.DistributionAggregationDescriptor") - proto.RegisterType((*IntervalAggregation)(nil), "opencensus.proto.stats.IntervalAggregation") - proto.RegisterType((*IntervalAggregation_Interval)(nil), "opencensus.proto.stats.IntervalAggregation.Interval") - proto.RegisterType((*IntervalAggregationDescriptor)(nil), "opencensus.proto.stats.IntervalAggregationDescriptor") proto.RegisterType((*Tag)(nil), "opencensus.proto.stats.Tag") - proto.RegisterType((*ViewDescriptor)(nil), "opencensus.proto.stats.ViewDescriptor") - proto.RegisterType((*DistributionView)(nil), "opencensus.proto.stats.DistributionView") - proto.RegisterType((*IntervalView)(nil), "opencensus.proto.stats.IntervalView") + proto.RegisterType((*Measure)(nil), "opencensus.proto.stats.Measure") proto.RegisterType((*View)(nil), "opencensus.proto.stats.View") - proto.RegisterEnum("opencensus.proto.stats.MeasurementDescriptor_BasicUnit", MeasurementDescriptor_BasicUnit_name, MeasurementDescriptor_BasicUnit_value) + proto.RegisterType((*CountAggregation)(nil), "opencensus.proto.stats.CountAggregation") + proto.RegisterType((*SumAggregation)(nil), "opencensus.proto.stats.SumAggregation") + proto.RegisterType((*LastValueAggregation)(nil), "opencensus.proto.stats.LastValueAggregation") + proto.RegisterType((*DistributionAggregation)(nil), "opencensus.proto.stats.DistributionAggregation") + proto.RegisterType((*Measurement)(nil), "opencensus.proto.stats.Measurement") + proto.RegisterEnum("opencensus.proto.stats.Measure_Type", Measure_Type_name, Measure_Type_value) } -func init() { proto.RegisterFile("stats.proto", fileDescriptor0) } +func init() { proto.RegisterFile("opencensus/proto/stats/stats.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 917 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xdf, 0x72, 0xdb, 0xc4, - 0x17, 0x8e, 0x2c, 0xdb, 0x89, 0x8f, 0xec, 0x54, 0xbf, 0x6d, 0x7f, 0x54, 0x71, 0x06, 0x30, 0x82, - 0x61, 0x3c, 0x53, 0x70, 0x8a, 0xa1, 0xc3, 0x70, 0x41, 0x87, 0x38, 0xc9, 0x4c, 0x32, 0xa1, 0x4e, - 0x59, 0x39, 0x84, 0x3f, 0x17, 0x62, 0x6d, 0x2d, 0x9a, 0x25, 0xd1, 0xca, 0xa3, 0x5d, 0x25, 0xa4, - 0x6f, 0xc0, 0x0d, 0x57, 0xbc, 0x02, 0xcf, 0xc2, 0x35, 0x8f, 0xc0, 0x0d, 0xcf, 0xc1, 0xec, 0x4a, - 0xb2, 0xe5, 0xd4, 0x4e, 0x9b, 0xe9, 0x95, 0x57, 0xdf, 0x9e, 0xfd, 0xce, 0x77, 0xfe, 0x1a, 0x2c, - 0x21, 0x89, 0x14, 0xbd, 0x69, 0x12, 0xcb, 0x18, 0xbd, 0x15, 0x4f, 0x29, 0x9f, 0x50, 0x2e, 0xd2, - 0x1c, 0xe9, 0xe9, 0xdb, 0xf6, 0x3b, 0x61, 0x1c, 0x87, 0x17, 0x74, 0x47, 0x63, 0xe3, 0xf4, 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e, 0x4b, 0x3b, 0x46, 0x93, 0x66, 0x79, - 0xf9, 0xe0, 0x55, 0x01, 0xe5, 0x84, 0xb3, 0x85, 0xa3, 0xbe, 0x07, 0x75, 0xa8, 0x2a, 0x8e, 0xc1, - 0x13, 0xd8, 0x62, 0xf1, 0x0a, 0x86, 0x01, 0x78, 0xea, 0xe7, 0xb9, 0x42, 0x9e, 0x1b, 0x3f, 0x80, - 0x06, 0xb3, 0xec, 0xd7, 0xf5, 0xcf, 0xa7, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x50, 0xb8, 0x49, - 0x9d, 0x62, 0x09, 0x00, 0x00, + // 629 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xd1, 0x6e, 0xd3, 0x30, + 0x14, 0x6d, 0xd6, 0x6c, 0x5d, 0x6f, 0xb7, 0x11, 0xac, 0x6a, 0x0b, 0x43, 0x68, 0x25, 0x43, 0xa8, + 0x0f, 0x34, 0x91, 0x36, 0x84, 0xe0, 0x05, 0x89, 0xae, 0x45, 0x9b, 0x34, 0x46, 0xc9, 0xba, 0x21, + 0x78, 0xa9, 0xd2, 0xd4, 0x04, 0x6b, 0x89, 0x5d, 0xc5, 0x36, 0x68, 0x7f, 0xc3, 0xb7, 0xf0, 0x21, + 0x7c, 0x0b, 0xb2, 0x9d, 0x6a, 0xcd, 0xd4, 0x08, 0x89, 0x97, 0xc6, 0x3e, 0xb9, 0xe7, 0x5c, 0x1f, + 0xe7, 0xf4, 0x82, 0xc7, 0xe6, 0x98, 0xc6, 0x98, 0x72, 0xc9, 0x83, 0x79, 0xce, 0x04, 0x0b, 0xb8, + 0x88, 0x04, 0x37, 0xbf, 0xbe, 0x46, 0xd0, 0xee, 0x5d, 0x8d, 0x41, 0x7c, 0xfd, 0x76, 0xff, 0x20, + 0x61, 0x2c, 0x49, 0xb1, 0xe1, 0x4d, 0xe5, 0xb7, 0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 0x38, 0x4a, 0x42, 0x5d, 0x88, 0x9e, 0xc2, 0x56, 0x11, 0xb9, 0x89, 0x0e, 0x78, + 0x91, 0xe2, 0x02, 0xbb, 0x50, 0x39, 0x3f, 0x84, 0xad, 0x19, 0x93, 0xd3, 0x14, 0x9b, 0xcf, 0xa8, + 0xa3, 0x6c, 0x9d, 0xd6, 0xc2, 0x96, 0x41, 0xb5, 0x27, 0xf4, 0x04, 0x9a, 0x84, 0x16, 0x1f, 0x5a, + 0xff, 0x3b, 0xeb, 0xa7, 0xb5, 0x70, 0x93, 0x50, 0x63, 0x19, 0xf9, 0x60, 0xab, 0x79, 0x52, 0xe4, + 0x74, 0xdf, 0x37, 0xc3, 0xc6, 0x5f, 0x0c, 0x1b, 0x7f, 0xbc, 0x18, 0x36, 0xa1, 0xae, 0xeb, 0x37, + 0x8a, 0x99, 0xd2, 0x67, 0xf0, 0x88, 0xb0, 0x0a, 0x1b, 0x7d, 0xb8, 0x54, 0x8f, 0x91, 0x42, 0x46, + 0xd6, 0xd7, 0x41, 0x42, 0xc4, 0x77, 0x39, 0xf5, 0x63, 0x96, 0x05, 0xa6, 0xb8, 0x47, 0x28, 0x17, + 0xb9, 0x54, 0x37, 0xa3, 0xef, 0x34, 0xb8, 0xd3, 0xe9, 0x99, 0xf9, 0x98, 0x60, 0xda, 0x4b, 0x8a, + 0x31, 0x69, 0x0e, 0xb3, 0xa1, 0x1f, 0xc7, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x40, 0xb5, 0x0e, + 0xfc, 0x4c, 0x05, 0x00, 0x00, } diff --git a/gen-go/traceproto/doc.go b/gen-go/traceproto/doc.go deleted file mode 100644 index e11b1c1..0000000 --- a/gen-go/traceproto/doc.go +++ /dev/null @@ -1,19 +0,0 @@ -// 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. -// - -// Package traceproto contains generated Protobuf code for OpenCensus trace. -package traceproto - -//go:generate protoc -I ../../opencensus/proto/trace --go_out=. trace.proto diff --git a/gen-go/traceproto/trace.pb.go b/gen-go/traceproto/trace.pb.go index 87f4703..002f63f 100644 --- a/gen-go/traceproto/trace.pb.go +++ b/gen-go/traceproto/trace.pb.go @@ -1,11 +1,11 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: trace.proto +// source: opencensus/proto/trace/trace.proto /* Package traceproto is a generated protocol buffer package. It is generated from these files: - trace.proto + opencensus/proto/trace/trace.proto It has these top-level messages: Span @@ -34,6 +34,37 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +// Type of span. Can be used to specify additional relationships between spans +// in addition to a parent/child relationship. +type Span_SpanKind int32 + +const ( + // Unspecified. + Span_SPAN_KIND_UNSPECIFIED Span_SpanKind = 0 + // Indicates that the span covers server-side handling of an RPC or other + // remote network request. + Span_SERVER Span_SpanKind = 1 + // Indicates that the span covers the client-side wrapper around an RPC or + // other remote request. + Span_CLIENT Span_SpanKind = 2 +) + +var Span_SpanKind_name = map[int32]string{ + 0: "SPAN_KIND_UNSPECIFIED", + 1: "SERVER", + 2: "CLIENT", +} +var Span_SpanKind_value = map[string]int32{ + "SPAN_KIND_UNSPECIFIED": 0, + "SERVER": 1, + "CLIENT": 2, +} + +func (x Span_SpanKind) String() string { + return proto.EnumName(Span_SpanKind_name, int32(x)) +} +func (Span_SpanKind) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} } + // Indicates whether the message was sent or received. type Span_TimeEvent_MessageEvent_Type int32 @@ -100,6 +131,8 @@ func (Span_Link_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, // its sub-operations. A trace can also contain multiple root spans, // or none at all. Spans do not need to be contiguous - there may be // gaps or overlaps between spans in a trace. +// +// The next id is 15. // TODO(bdrutu): Add an example. type Span struct { // A unique identifier for a trace. All spans from the same trace share @@ -124,6 +157,10 @@ type Span struct { // // This field is required. Name *TruncatableString `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"` + // Distinguishes between spans generated in a particular context. For example, + // two spans with the same name may be distinguished using `CLIENT` + // and `SERVER` to identify queueing latency associated with the span. + Kind Span_SpanKind `protobuf:"varint,14,opt,name=kind,enum=opencensus.proto.trace.Span_SpanKind" json:"kind,omitempty"` // The start time of the span. On the client side, this is the time kept by // the local machine where the span execution starts. On the server side, this // is the time when the server's application handler starts running. @@ -184,6 +221,13 @@ func (m *Span) GetName() *TruncatableString { return nil } +func (m *Span) GetKind() Span_SpanKind { + if m != nil { + return m.Kind + } + return Span_SPAN_KIND_UNSPECIFIED +} + func (m *Span) GetStartTime() *google_protobuf.Timestamp { if m != nil { return m.StartTime @@ -1016,99 +1060,104 @@ func init() { proto.RegisterType((*StackTrace_StackFrames)(nil), "opencensus.proto.trace.StackTrace.StackFrames") proto.RegisterType((*Module)(nil), "opencensus.proto.trace.Module") proto.RegisterType((*TruncatableString)(nil), "opencensus.proto.trace.TruncatableString") + proto.RegisterEnum("opencensus.proto.trace.Span_SpanKind", Span_SpanKind_name, Span_SpanKind_value) proto.RegisterEnum("opencensus.proto.trace.Span_TimeEvent_MessageEvent_Type", Span_TimeEvent_MessageEvent_Type_name, Span_TimeEvent_MessageEvent_Type_value) proto.RegisterEnum("opencensus.proto.trace.Span_Link_Type", Span_Link_Type_name, Span_Link_Type_value) } -func init() { proto.RegisterFile("trace.proto", fileDescriptor0) } +func init() { proto.RegisterFile("opencensus/proto/trace/trace.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 1379 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdd, 0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, 0x94, 0x09, 0x3b, 0x95, 0xe7, 0x95, 0xbc, 0xa6, 0x4f, 0x87, 0x5a, - 0xeb, 0x33, 0x30, 0x19, 0xf1, 0x69, 0xd3, 0xbc, 0x65, 0xdc, 0xad, 0x6e, 0xbf, 0x6f, 0xfd, 0xb3, - 0x2b, 0xd6, 0x28, 0x8a, 0x99, 0x43, 0x04, 0x19, 0x4f, 0xe9, 0x50, 0x44, 0x1e, 0x9b, 0x60, 0x05, - 0x43, 0x0f, 0x01, 0xb8, 0x20, 0x91, 0xb0, 0xa5, 0x6b, 0xcd, 0x82, 0x22, 0x69, 0x59, 0xda, 0x2d, - 0x2b, 0x75, 0xcb, 0x1a, 0xa5, 0x7e, 0xe3, 0x8a, 0xd2, 0x96, 0x7b, 0x74, 0x1f, 0xca, 0x94, 0xb9, - 0x1a, 0x58, 0x3c, 0x17, 0x58, 0xa2, 0xcc, 0x55, 0xb0, 0xcf, 0x01, 0x88, 0x10, 0x91, 0x37, 0x8e, - 0x05, 0xe5, 0xcd, 0x92, 0x02, 0xde, 0x39, 0xcb, 0x6c, 0xe9, 0xa4, 0xb5, 0x9b, 0xa9, 0xe3, 0x39, - 0x28, 0xda, 0x87, 0x2a, 0x17, 0xc4, 0x79, 0x69, 0x2b, 0xd5, 0x66, 0x59, 0x31, 0xb5, 0xcf, 0x64, - 0x92, 0xaa, 0x23, 0xb9, 0xc4, 0xc0, 0xb3, 0x35, 0xea, 0x42, 0x55, 0x3a, 0x60, 0xd3, 0x57, 0x94, - 0x09, 0xde, 0xac, 0x5c, 0xc0, 0x1c, 0xe9, 0x45, 0x47, 0xa9, 0x63, 0x10, 0xd9, 0x1a, 0xed, 0x40, - 0x61, 0xea, 0xb1, 0x97, 0xbc, 0x09, 0xe7, 0x18, 0x22, 0x39, 0x8e, 0xa4, 0x26, 0xd6, 0x00, 0xf4, - 0x00, 0x8a, 0x5c, 0x10, 0x11, 0xf3, 0x66, 0x55, 0x41, 0x6f, 0xbc, 0xc3, 0x07, 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2, 0x61, 0xa1, 0x55, 0xa9, 0x6b, 0x8f, 0x4f, 0x05, 0x5d, - 0x74, 0x38, 0x93, 0xed, 0x9d, 0x0a, 0xaa, 0x1c, 0xde, 0x7b, 0x0d, 0xd7, 0xbc, 0xe0, 0x0c, 0xa3, - 0xf6, 0x40, 0x5d, 0xec, 0x40, 0x9e, 0x0c, 0x8c, 0x17, 0x5f, 0x4c, 0x3c, 0x71, 0x12, 0x8f, 0x2d, - 0x27, 0xf0, 0xb7, 0xb4, 0xf2, 0xa6, 0xc7, 0xb8, 0x88, 0x62, 0x9f, 0x32, 0xfd, 0xc2, 0x6d, 0xcd, - 0x78, 0x36, 0x15, 0xcf, 0xd6, 0x84, 0xb2, 0xcd, 0x49, 0xb0, 0xa5, 0xe8, 0xd4, 0xc9, 0x27, 0xb3, - 0xe5, 0xb8, 0xa8, 0x3e, 0xf7, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x9b, 0x1a, 0x69, 0xb4, - 0x0e, 0x00, 0x00, + // 1441 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xdd, 0x6e, 0xdb, 0xc6, + 0x12, 0x36, 0x25, 0xea, 0x6f, 0x24, 0xeb, 0xc8, 0x1b, 0xc7, 0x91, 0x75, 0x72, 0x12, 0x1f, 0xb5, + 0x4d, 0x5c, 0x14, 0x96, 0x5b, 0xa7, 0x09, 0x9c, 0xa0, 0x41, 0xe0, 0x1f, 0xba, 0x12, 0xec, 0x08, + 0xea, 0x4a, 0x31, 0xda, 0x14, 0x28, 0x41, 0x91, 0x6b, 0x99, 0xb0, 0xb8, 0x24, 0xb8, 0xcb, 0x14, + 0xce, 0x75, 0x2f, 0x0b, 0x14, 0xbd, 0xe8, 0x0b, 0xf4, 0xae, 0x6f, 0xd3, 0x27, 0xe8, 0x4b, 0x14, + 0x28, 0x7a, 0x59, 0xec, 0x2e,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e1, 0x39, + 0x27, 0xb3, 0x0e, 0xa7, 0xb2, 0xdd, 0x73, 0x4e, 0xa4, 0xc3, 0xbb, 0x3e, 0xac, 0xba, 0xfe, 0x25, + 0x46, 0xed, 0x82, 0x0c, 0x6c, 0x4f, 0x9c, 0xf4, 0xb4, 0xd7, 0xfb, 0x23, 0x97, 0x9f, 0x46, 0xc3, + 0x96, 0xed, 0x7b, 0x9b, 0x4a, 0x79, 0xc3, 0xa5, 0x8c, 0x87, 0x91, 0x47, 0xa8, 0x7a, 0x20, 0x37, + 0x27, 0x3c, 0x1b, 0xea, 0xd7, 0xf0, 0x88, 0xd0, 0x8d, 0x51, 0xfc, 0xa3, 0x58, 0x0d, 0x8f, 0x79, + 0xf9, 0xef, 0xd1, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xea, 0x2e, 0x0d, 0x72, 0x3a, 0x0f, 0x00, + 0x00, } diff --git a/mkgogen.sh b/mkgogen.sh new file mode 100755 index 0000000..d712265 --- /dev/null +++ b/mkgogen.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# Run this if opencensus-proto is checked in the GOPATH. +# go get -d github.com/census-instrumentation/opencensus-proto +# to check in the repo to the GOAPTH. +# +# To generate: +# +# cd $(go env GOPATH)/census-instrumentation/opencensus-proto +# ./mkgogen.sh + +OUTDIR="$(go env GOPATH)/src" + +protoc --go_out=plugins=grpc:$OUTDIR opencensus/proto/stats/stats.proto \ + && protoc --go_out=plugins=grpc:$OUTDIR opencensus/proto/stats/metrics/metrics.proto \ + && protoc --go_out=plugins=grpc:$OUTDIR opencensus/proto/trace/trace.proto \ + && protoc -I=. --go_out=plugins=grpc:$OUTDIR opencensus/proto/exporter/exporter.proto diff --git a/opencensus/proto/stats/metrics/metrics.proto b/opencensus/proto/stats/metrics/metrics.proto index 9dc28e4..0e210b5 100644 --- a/opencensus/proto/stats/metrics/metrics.proto +++ b/opencensus/proto/stats/metrics/metrics.proto @@ -23,7 +23,8 @@ package opencensus.proto.stats.metrics; import "google/protobuf/timestamp.proto"; -option go_package = "metricsproto"; +option go_package = "github.com/census-instrumentation/opencensus-proto/gen-go/statsproto/metricsproto"; + option java_multiple_files = true; option java_package = "io.opencensus.proto.metrics"; option java_outer_classname = "MetricsProto"; diff --git a/opencensus/proto/stats/stats.proto b/opencensus/proto/stats/stats.proto index 81146e9..31089eb 100644 --- a/opencensus/proto/stats/stats.proto +++ b/opencensus/proto/stats/stats.proto @@ -18,7 +18,8 @@ package opencensus.proto.stats; import "google/protobuf/timestamp.proto"; -option go_package = "statsproto"; +option go_package = "github.com/census-instrumentation/opencensus-proto/gen-go/statsproto"; + option java_multiple_files = true; option java_package = "io.opencensus.proto.stats"; option java_outer_classname = "StatsProto"; diff --git a/opencensus/proto/trace/trace.proto b/opencensus/proto/trace/trace.proto index 810a913..8dd3524 100644 --- a/opencensus/proto/trace/trace.proto +++ b/opencensus/proto/trace/trace.proto @@ -23,7 +23,7 @@ option java_multiple_files = true; option java_package = "io.opencensus.proto.trace"; option java_outer_classname = "TraceProto"; -option go_package = "traceproto"; +option go_package = "github.com/census-instrumentation/opencensus-proto/gen-go/traceproto"; // A span represents a single operation within a trace. Spans can be // nested to form a trace tree. Often, a trace contains a root span