1 // Code generated by protoc-gen-go. DO NOT EDIT.
2 // source: opencensus/proto/trace/v1/trace_config.proto
8 proto "github.com/golang/protobuf/proto"
12 // Reference imports to suppress errors if they are not otherwise used.
17 // This is a compile-time assertion to ensure that this generated file
18 // is compatible with the proto package it is being compiled against.
19 // A compilation error at this line likely means your copy of the
20 // proto package needs to be updated.
21 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
23 // How spans should be sampled:
26 // - Always follow the parent Span's decision (off if no parent).
27 type ConstantSampler_ConstantDecision int32
30 ConstantSampler_ALWAYS_OFF ConstantSampler_ConstantDecision = 0
31 ConstantSampler_ALWAYS_ON ConstantSampler_ConstantDecision = 1
32 ConstantSampler_ALWAYS_PARENT ConstantSampler_ConstantDecision = 2
35 var ConstantSampler_ConstantDecision_name = map[int32]string{
41 var ConstantSampler_ConstantDecision_value = map[string]int32{
47 func (x ConstantSampler_ConstantDecision) String() string {
48 return proto.EnumName(ConstantSampler_ConstantDecision_name, int32(x))
51 func (ConstantSampler_ConstantDecision) EnumDescriptor() ([]byte, []int) {
52 return fileDescriptor_5359209b41ff50c5, []int{2, 0}
55 // Global configuration of the trace service. All fields must be specified, or
56 // the default (zero) values will be used for each type.
57 type TraceConfig struct {
58 // The global default sampler used to make decisions on span sampling.
60 // Types that are valid to be assigned to Sampler:
61 // *TraceConfig_ProbabilitySampler
62 // *TraceConfig_ConstantSampler
63 // *TraceConfig_RateLimitingSampler
64 Sampler isTraceConfig_Sampler `protobuf_oneof:"sampler"`
65 // The global default max number of attributes per span.
66 MaxNumberOfAttributes int64 `protobuf:"varint,4,opt,name=max_number_of_attributes,json=maxNumberOfAttributes,proto3" json:"max_number_of_attributes,omitempty"`
67 // The global default max number of annotation events per span.
68 MaxNumberOfAnnotations int64 `protobuf:"varint,5,opt,name=max_number_of_annotations,json=maxNumberOfAnnotations,proto3" json:"max_number_of_annotations,omitempty"`
69 // The global default max number of message events per span.
70 MaxNumberOfMessageEvents int64 `protobuf:"varint,6,opt,name=max_number_of_message_events,json=maxNumberOfMessageEvents,proto3" json:"max_number_of_message_events,omitempty"`
71 // The global default max number of link entries per span.
72 MaxNumberOfLinks int64 `protobuf:"varint,7,opt,name=max_number_of_links,json=maxNumberOfLinks,proto3" json:"max_number_of_links,omitempty"`
73 XXX_NoUnkeyedLiteral struct{} `json:"-"`
74 XXX_unrecognized []byte `json:"-"`
75 XXX_sizecache int32 `json:"-"`
78 func (m *TraceConfig) Reset() { *m = TraceConfig{} }
79 func (m *TraceConfig) String() string { return proto.CompactTextString(m) }
80 func (*TraceConfig) ProtoMessage() {}
81 func (*TraceConfig) Descriptor() ([]byte, []int) {
82 return fileDescriptor_5359209b41ff50c5, []int{0}
85 func (m *TraceConfig) XXX_Unmarshal(b []byte) error {
86 return xxx_messageInfo_TraceConfig.Unmarshal(m, b)
88 func (m *TraceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
89 return xxx_messageInfo_TraceConfig.Marshal(b, m, deterministic)
91 func (m *TraceConfig) XXX_Merge(src proto.Message) {
92 xxx_messageInfo_TraceConfig.Merge(m, src)
94 func (m *TraceConfig) XXX_Size() int {
95 return xxx_messageInfo_TraceConfig.Size(m)
97 func (m *TraceConfig) XXX_DiscardUnknown() {
98 xxx_messageInfo_TraceConfig.DiscardUnknown(m)
101 var xxx_messageInfo_TraceConfig proto.InternalMessageInfo
103 type isTraceConfig_Sampler interface {
104 isTraceConfig_Sampler()
107 type TraceConfig_ProbabilitySampler struct {
108 ProbabilitySampler *ProbabilitySampler `protobuf:"bytes,1,opt,name=probability_sampler,json=probabilitySampler,proto3,oneof"`
111 type TraceConfig_ConstantSampler struct {
112 ConstantSampler *ConstantSampler `protobuf:"bytes,2,opt,name=constant_sampler,json=constantSampler,proto3,oneof"`
115 type TraceConfig_RateLimitingSampler struct {
116 RateLimitingSampler *RateLimitingSampler `protobuf:"bytes,3,opt,name=rate_limiting_sampler,json=rateLimitingSampler,proto3,oneof"`
119 func (*TraceConfig_ProbabilitySampler) isTraceConfig_Sampler() {}
121 func (*TraceConfig_ConstantSampler) isTraceConfig_Sampler() {}
123 func (*TraceConfig_RateLimitingSampler) isTraceConfig_Sampler() {}
125 func (m *TraceConfig) GetSampler() isTraceConfig_Sampler {
132 func (m *TraceConfig) GetProbabilitySampler() *ProbabilitySampler {
133 if x, ok := m.GetSampler().(*TraceConfig_ProbabilitySampler); ok {
134 return x.ProbabilitySampler
139 func (m *TraceConfig) GetConstantSampler() *ConstantSampler {
140 if x, ok := m.GetSampler().(*TraceConfig_ConstantSampler); ok {
141 return x.ConstantSampler
146 func (m *TraceConfig) GetRateLimitingSampler() *RateLimitingSampler {
147 if x, ok := m.GetSampler().(*TraceConfig_RateLimitingSampler); ok {
148 return x.RateLimitingSampler
153 func (m *TraceConfig) GetMaxNumberOfAttributes() int64 {
155 return m.MaxNumberOfAttributes
160 func (m *TraceConfig) GetMaxNumberOfAnnotations() int64 {
162 return m.MaxNumberOfAnnotations
167 func (m *TraceConfig) GetMaxNumberOfMessageEvents() int64 {
169 return m.MaxNumberOfMessageEvents
174 func (m *TraceConfig) GetMaxNumberOfLinks() int64 {
176 return m.MaxNumberOfLinks
181 // XXX_OneofWrappers is for the internal use of the proto package.
182 func (*TraceConfig) XXX_OneofWrappers() []interface{} {
183 return []interface{}{
184 (*TraceConfig_ProbabilitySampler)(nil),
185 (*TraceConfig_ConstantSampler)(nil),
186 (*TraceConfig_RateLimitingSampler)(nil),
190 // Sampler that tries to uniformly sample traces with a given probability.
191 // The probability of sampling a trace is equal to that of the specified probability.
192 type ProbabilitySampler struct {
193 // The desired probability of sampling. Must be within [0.0, 1.0].
194 SamplingProbability float64 `protobuf:"fixed64,1,opt,name=samplingProbability,proto3" json:"samplingProbability,omitempty"`
195 XXX_NoUnkeyedLiteral struct{} `json:"-"`
196 XXX_unrecognized []byte `json:"-"`
197 XXX_sizecache int32 `json:"-"`
200 func (m *ProbabilitySampler) Reset() { *m = ProbabilitySampler{} }
201 func (m *ProbabilitySampler) String() string { return proto.CompactTextString(m) }
202 func (*ProbabilitySampler) ProtoMessage() {}
203 func (*ProbabilitySampler) Descriptor() ([]byte, []int) {
204 return fileDescriptor_5359209b41ff50c5, []int{1}
207 func (m *ProbabilitySampler) XXX_Unmarshal(b []byte) error {
208 return xxx_messageInfo_ProbabilitySampler.Unmarshal(m, b)
210 func (m *ProbabilitySampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
211 return xxx_messageInfo_ProbabilitySampler.Marshal(b, m, deterministic)
213 func (m *ProbabilitySampler) XXX_Merge(src proto.Message) {
214 xxx_messageInfo_ProbabilitySampler.Merge(m, src)
216 func (m *ProbabilitySampler) XXX_Size() int {
217 return xxx_messageInfo_ProbabilitySampler.Size(m)
219 func (m *ProbabilitySampler) XXX_DiscardUnknown() {
220 xxx_messageInfo_ProbabilitySampler.DiscardUnknown(m)
223 var xxx_messageInfo_ProbabilitySampler proto.InternalMessageInfo
225 func (m *ProbabilitySampler) GetSamplingProbability() float64 {
227 return m.SamplingProbability
232 // Sampler that always makes a constant decision on span sampling.
233 type ConstantSampler struct {
234 Decision ConstantSampler_ConstantDecision `protobuf:"varint,1,opt,name=decision,proto3,enum=opencensus.proto.trace.v1.ConstantSampler_ConstantDecision" json:"decision,omitempty"`
235 XXX_NoUnkeyedLiteral struct{} `json:"-"`
236 XXX_unrecognized []byte `json:"-"`
237 XXX_sizecache int32 `json:"-"`
240 func (m *ConstantSampler) Reset() { *m = ConstantSampler{} }
241 func (m *ConstantSampler) String() string { return proto.CompactTextString(m) }
242 func (*ConstantSampler) ProtoMessage() {}
243 func (*ConstantSampler) Descriptor() ([]byte, []int) {
244 return fileDescriptor_5359209b41ff50c5, []int{2}
247 func (m *ConstantSampler) XXX_Unmarshal(b []byte) error {
248 return xxx_messageInfo_ConstantSampler.Unmarshal(m, b)
250 func (m *ConstantSampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
251 return xxx_messageInfo_ConstantSampler.Marshal(b, m, deterministic)
253 func (m *ConstantSampler) XXX_Merge(src proto.Message) {
254 xxx_messageInfo_ConstantSampler.Merge(m, src)
256 func (m *ConstantSampler) XXX_Size() int {
257 return xxx_messageInfo_ConstantSampler.Size(m)
259 func (m *ConstantSampler) XXX_DiscardUnknown() {
260 xxx_messageInfo_ConstantSampler.DiscardUnknown(m)
263 var xxx_messageInfo_ConstantSampler proto.InternalMessageInfo
265 func (m *ConstantSampler) GetDecision() ConstantSampler_ConstantDecision {
269 return ConstantSampler_ALWAYS_OFF
272 // Sampler that tries to sample with a rate per time window.
273 type RateLimitingSampler struct {
275 Qps int64 `protobuf:"varint,1,opt,name=qps,proto3" json:"qps,omitempty"`
276 XXX_NoUnkeyedLiteral struct{} `json:"-"`
277 XXX_unrecognized []byte `json:"-"`
278 XXX_sizecache int32 `json:"-"`
281 func (m *RateLimitingSampler) Reset() { *m = RateLimitingSampler{} }
282 func (m *RateLimitingSampler) String() string { return proto.CompactTextString(m) }
283 func (*RateLimitingSampler) ProtoMessage() {}
284 func (*RateLimitingSampler) Descriptor() ([]byte, []int) {
285 return fileDescriptor_5359209b41ff50c5, []int{3}
288 func (m *RateLimitingSampler) XXX_Unmarshal(b []byte) error {
289 return xxx_messageInfo_RateLimitingSampler.Unmarshal(m, b)
291 func (m *RateLimitingSampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
292 return xxx_messageInfo_RateLimitingSampler.Marshal(b, m, deterministic)
294 func (m *RateLimitingSampler) XXX_Merge(src proto.Message) {
295 xxx_messageInfo_RateLimitingSampler.Merge(m, src)
297 func (m *RateLimitingSampler) XXX_Size() int {
298 return xxx_messageInfo_RateLimitingSampler.Size(m)
300 func (m *RateLimitingSampler) XXX_DiscardUnknown() {
301 xxx_messageInfo_RateLimitingSampler.DiscardUnknown(m)
304 var xxx_messageInfo_RateLimitingSampler proto.InternalMessageInfo
306 func (m *RateLimitingSampler) GetQps() int64 {
314 proto.RegisterEnum("opencensus.proto.trace.v1.ConstantSampler_ConstantDecision", ConstantSampler_ConstantDecision_name, ConstantSampler_ConstantDecision_value)
315 proto.RegisterType((*TraceConfig)(nil), "opencensus.proto.trace.v1.TraceConfig")
316 proto.RegisterType((*ProbabilitySampler)(nil), "opencensus.proto.trace.v1.ProbabilitySampler")
317 proto.RegisterType((*ConstantSampler)(nil), "opencensus.proto.trace.v1.ConstantSampler")
318 proto.RegisterType((*RateLimitingSampler)(nil), "opencensus.proto.trace.v1.RateLimitingSampler")
322 proto.RegisterFile("opencensus/proto/trace/v1/trace_config.proto", fileDescriptor_5359209b41ff50c5)
325 var fileDescriptor_5359209b41ff50c5 = []byte{
326 // 486 bytes of a gzipped FileDescriptorProto
327 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xc1, 0x4e, 0xdb, 0x40,
328 0x10, 0x86, 0x31, 0xa1, 0x50, 0x06, 0x01, 0xee, 0x5a, 0x54, 0x46, 0xe2, 0x80, 0x7c, 0x29, 0xaa,
329 0x6a, 0xbb, 0xd0, 0x43, 0x55, 0x55, 0xaa, 0x94, 0x00, 0x51, 0x0f, 0x69, 0x88, 0x0c, 0x52, 0xd4,
330 0x5e, 0xdc, 0xb5, 0xd9, 0xb8, 0xab, 0xc6, 0xb3, 0xae, 0x77, 0x1d, 0xd1, 0x77, 0xe9, 0x43, 0xf4,
331 0x11, 0xab, 0xac, 0x5d, 0xdb, 0x49, 0x00, 0x71, 0xdb, 0xf9, 0xff, 0xf9, 0x7e, 0xaf, 0xbc, 0x33,
332 0xf0, 0x46, 0x64, 0x0c, 0x63, 0x86, 0xb2, 0x90, 0x7e, 0x96, 0x0b, 0x25, 0x7c, 0x95, 0xd3, 0x98,
333 0xf9, 0xb3, 0xd3, 0xf2, 0x10, 0xc6, 0x02, 0x27, 0x3c, 0xf1, 0xb4, 0x47, 0x0e, 0x9b, 0xee, 0x52,
334 0xf1, 0x74, 0x93, 0x37, 0x3b, 0x75, 0xfe, 0x6c, 0xc0, 0xce, 0xcd, 0xbc, 0x38, 0xd7, 0x00, 0xf9,
335 0x0e, 0x56, 0x96, 0x8b, 0x88, 0x46, 0x7c, 0xca, 0xd5, 0xef, 0x50, 0xd2, 0x34, 0x9b, 0xb2, 0xdc,
336 0x36, 0x8e, 0x8d, 0x93, 0x9d, 0x33, 0xd7, 0x7b, 0x30, 0xc8, 0x1b, 0x35, 0xd4, 0x75, 0x09, 0x7d,
337 0x5e, 0x0b, 0x48, 0xb6, 0xa2, 0x92, 0x31, 0x98, 0xb1, 0x40, 0xa9, 0x28, 0xaa, 0x3a, 0x7e, 0x5d,
338 0xc7, 0xbf, 0x7e, 0x24, 0xfe, 0xbc, 0x42, 0x9a, 0xec, 0xfd, 0x78, 0x51, 0x22, 0xb7, 0x70, 0x90,
339 0x53, 0xc5, 0xc2, 0x29, 0x4f, 0xb9, 0xe2, 0x98, 0xd4, 0xe9, 0x1d, 0x9d, 0xee, 0x3d, 0x92, 0x1e,
340 0x50, 0xc5, 0x06, 0x15, 0xd6, 0x7c, 0xc1, 0xca, 0x57, 0x65, 0xf2, 0x1e, 0xec, 0x94, 0xde, 0x85,
341 0x58, 0xa4, 0x11, 0xcb, 0x43, 0x31, 0x09, 0xa9, 0x52, 0x39, 0x8f, 0x0a, 0xc5, 0xa4, 0xbd, 0x71,
342 0x6c, 0x9c, 0x74, 0x82, 0x83, 0x94, 0xde, 0x0d, 0xb5, 0x7d, 0x35, 0xe9, 0xd6, 0x26, 0xf9, 0x00,
343 0x87, 0x4b, 0x20, 0xa2, 0x50, 0x54, 0x71, 0x81, 0xd2, 0x7e, 0xa6, 0xc9, 0x97, 0x6d, 0xb2, 0x71,
344 0xc9, 0x27, 0x38, 0x5a, 0x44, 0x53, 0x26, 0x25, 0x4d, 0x58, 0xc8, 0x66, 0x0c, 0x95, 0xb4, 0x37,
345 0x35, 0x6d, 0xb7, 0xe8, 0x2f, 0x65, 0xc3, 0xa5, 0xf6, 0x89, 0x0b, 0xd6, 0x22, 0x3f, 0xe5, 0xf8,
346 0x53, 0xda, 0x5b, 0x1a, 0x33, 0x5b, 0xd8, 0x60, 0xae, 0xf7, 0xb6, 0x61, 0xab, 0xfa, 0x75, 0x4e,
347 0x1f, 0xc8, 0xea, 0xc3, 0x92, 0xb7, 0x60, 0xe9, 0x06, 0x8e, 0x49, 0xcb, 0xd5, 0x43, 0x62, 0x04,
348 0xf7, 0x59, 0xce, 0x5f, 0x03, 0xf6, 0x97, 0x9e, 0x90, 0x8c, 0xe1, 0xf9, 0x2d, 0x8b, 0xb9, 0xe4,
349 0x02, 0x35, 0xba, 0x77, 0xf6, 0xf1, 0xe9, 0x03, 0x50, 0xd7, 0x17, 0x55, 0x44, 0x50, 0x87, 0x39,
350 0x17, 0x60, 0x2e, 0xbb, 0x64, 0x0f, 0xa0, 0x3b, 0x18, 0x77, 0xbf, 0x5e, 0x87, 0x57, 0xfd, 0xbe,
351 0xb9, 0x46, 0x76, 0x61, 0xfb, 0x7f, 0x3d, 0x34, 0x0d, 0xf2, 0x02, 0x76, 0xab, 0x72, 0xd4, 0x0d,
352 0x2e, 0x87, 0x37, 0xe6, 0xba, 0xf3, 0x0a, 0xac, 0x7b, 0xc6, 0x82, 0x98, 0xd0, 0xf9, 0x95, 0x49,
353 0x7d, 0xe1, 0x4e, 0x30, 0x3f, 0xf6, 0x66, 0x70, 0xc4, 0xc5, 0xc3, 0x37, 0xef, 0x99, 0xad, 0xfd,
354 0x1a, 0xcd, 0xad, 0x91, 0xf1, 0xad, 0x97, 0x70, 0xf5, 0xa3, 0x88, 0xbc, 0x58, 0xa4, 0x7e, 0x49,
355 0xb9, 0x1c, 0xa5, 0xca, 0x8b, 0x94, 0x61, 0xf9, 0xea, 0x7e, 0x13, 0xe8, 0x96, 0x1b, 0x9e, 0x30,
356 0x74, 0x93, 0x66, 0xd1, 0xa3, 0x4d, 0x2d, 0xbf, 0xfb, 0x17, 0x00, 0x00, 0xff, 0xff, 0x13, 0xe2,
357 0xd9, 0x56, 0x0c, 0x04, 0x00, 0x00,