blob: 025387784f814bfbe7bca8aa94907e5f67942ac9 [file] [log] [blame]
Sergiusz Bazanskie5a956a2019-11-17 22:38:40 +01001// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: opencensus/proto/trace/v1/trace_config.proto
3
4package v1
5
6import (
7 fmt "fmt"
8 proto "github.com/golang/protobuf/proto"
9 math "math"
10)
11
12// Reference imports to suppress errors if they are not otherwise used.
13var _ = proto.Marshal
14var _ = fmt.Errorf
15var _ = math.Inf
16
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.
21const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
22
23// How spans should be sampled:
24// - Always off
25// - Always on
26// - Always follow the parent Span's decision (off if no parent).
27type ConstantSampler_ConstantDecision int32
28
29const (
30 ConstantSampler_ALWAYS_OFF ConstantSampler_ConstantDecision = 0
31 ConstantSampler_ALWAYS_ON ConstantSampler_ConstantDecision = 1
32 ConstantSampler_ALWAYS_PARENT ConstantSampler_ConstantDecision = 2
33)
34
35var ConstantSampler_ConstantDecision_name = map[int32]string{
36 0: "ALWAYS_OFF",
37 1: "ALWAYS_ON",
38 2: "ALWAYS_PARENT",
39}
40
41var ConstantSampler_ConstantDecision_value = map[string]int32{
42 "ALWAYS_OFF": 0,
43 "ALWAYS_ON": 1,
44 "ALWAYS_PARENT": 2,
45}
46
47func (x ConstantSampler_ConstantDecision) String() string {
48 return proto.EnumName(ConstantSampler_ConstantDecision_name, int32(x))
49}
50
51func (ConstantSampler_ConstantDecision) EnumDescriptor() ([]byte, []int) {
52 return fileDescriptor_5359209b41ff50c5, []int{2, 0}
53}
54
55// Global configuration of the trace service. All fields must be specified, or
56// the default (zero) values will be used for each type.
57type TraceConfig struct {
58 // The global default sampler used to make decisions on span sampling.
59 //
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:"-"`
76}
77
78func (m *TraceConfig) Reset() { *m = TraceConfig{} }
79func (m *TraceConfig) String() string { return proto.CompactTextString(m) }
80func (*TraceConfig) ProtoMessage() {}
81func (*TraceConfig) Descriptor() ([]byte, []int) {
82 return fileDescriptor_5359209b41ff50c5, []int{0}
83}
84
85func (m *TraceConfig) XXX_Unmarshal(b []byte) error {
86 return xxx_messageInfo_TraceConfig.Unmarshal(m, b)
87}
88func (m *TraceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
89 return xxx_messageInfo_TraceConfig.Marshal(b, m, deterministic)
90}
91func (m *TraceConfig) XXX_Merge(src proto.Message) {
92 xxx_messageInfo_TraceConfig.Merge(m, src)
93}
94func (m *TraceConfig) XXX_Size() int {
95 return xxx_messageInfo_TraceConfig.Size(m)
96}
97func (m *TraceConfig) XXX_DiscardUnknown() {
98 xxx_messageInfo_TraceConfig.DiscardUnknown(m)
99}
100
101var xxx_messageInfo_TraceConfig proto.InternalMessageInfo
102
103type isTraceConfig_Sampler interface {
104 isTraceConfig_Sampler()
105}
106
107type TraceConfig_ProbabilitySampler struct {
108 ProbabilitySampler *ProbabilitySampler `protobuf:"bytes,1,opt,name=probability_sampler,json=probabilitySampler,proto3,oneof"`
109}
110
111type TraceConfig_ConstantSampler struct {
112 ConstantSampler *ConstantSampler `protobuf:"bytes,2,opt,name=constant_sampler,json=constantSampler,proto3,oneof"`
113}
114
115type TraceConfig_RateLimitingSampler struct {
116 RateLimitingSampler *RateLimitingSampler `protobuf:"bytes,3,opt,name=rate_limiting_sampler,json=rateLimitingSampler,proto3,oneof"`
117}
118
119func (*TraceConfig_ProbabilitySampler) isTraceConfig_Sampler() {}
120
121func (*TraceConfig_ConstantSampler) isTraceConfig_Sampler() {}
122
123func (*TraceConfig_RateLimitingSampler) isTraceConfig_Sampler() {}
124
125func (m *TraceConfig) GetSampler() isTraceConfig_Sampler {
126 if m != nil {
127 return m.Sampler
128 }
129 return nil
130}
131
132func (m *TraceConfig) GetProbabilitySampler() *ProbabilitySampler {
133 if x, ok := m.GetSampler().(*TraceConfig_ProbabilitySampler); ok {
134 return x.ProbabilitySampler
135 }
136 return nil
137}
138
139func (m *TraceConfig) GetConstantSampler() *ConstantSampler {
140 if x, ok := m.GetSampler().(*TraceConfig_ConstantSampler); ok {
141 return x.ConstantSampler
142 }
143 return nil
144}
145
146func (m *TraceConfig) GetRateLimitingSampler() *RateLimitingSampler {
147 if x, ok := m.GetSampler().(*TraceConfig_RateLimitingSampler); ok {
148 return x.RateLimitingSampler
149 }
150 return nil
151}
152
153func (m *TraceConfig) GetMaxNumberOfAttributes() int64 {
154 if m != nil {
155 return m.MaxNumberOfAttributes
156 }
157 return 0
158}
159
160func (m *TraceConfig) GetMaxNumberOfAnnotations() int64 {
161 if m != nil {
162 return m.MaxNumberOfAnnotations
163 }
164 return 0
165}
166
167func (m *TraceConfig) GetMaxNumberOfMessageEvents() int64 {
168 if m != nil {
169 return m.MaxNumberOfMessageEvents
170 }
171 return 0
172}
173
174func (m *TraceConfig) GetMaxNumberOfLinks() int64 {
175 if m != nil {
176 return m.MaxNumberOfLinks
177 }
178 return 0
179}
180
181// XXX_OneofWrappers is for the internal use of the proto package.
182func (*TraceConfig) XXX_OneofWrappers() []interface{} {
183 return []interface{}{
184 (*TraceConfig_ProbabilitySampler)(nil),
185 (*TraceConfig_ConstantSampler)(nil),
186 (*TraceConfig_RateLimitingSampler)(nil),
187 }
188}
189
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.
192type 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:"-"`
198}
199
200func (m *ProbabilitySampler) Reset() { *m = ProbabilitySampler{} }
201func (m *ProbabilitySampler) String() string { return proto.CompactTextString(m) }
202func (*ProbabilitySampler) ProtoMessage() {}
203func (*ProbabilitySampler) Descriptor() ([]byte, []int) {
204 return fileDescriptor_5359209b41ff50c5, []int{1}
205}
206
207func (m *ProbabilitySampler) XXX_Unmarshal(b []byte) error {
208 return xxx_messageInfo_ProbabilitySampler.Unmarshal(m, b)
209}
210func (m *ProbabilitySampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
211 return xxx_messageInfo_ProbabilitySampler.Marshal(b, m, deterministic)
212}
213func (m *ProbabilitySampler) XXX_Merge(src proto.Message) {
214 xxx_messageInfo_ProbabilitySampler.Merge(m, src)
215}
216func (m *ProbabilitySampler) XXX_Size() int {
217 return xxx_messageInfo_ProbabilitySampler.Size(m)
218}
219func (m *ProbabilitySampler) XXX_DiscardUnknown() {
220 xxx_messageInfo_ProbabilitySampler.DiscardUnknown(m)
221}
222
223var xxx_messageInfo_ProbabilitySampler proto.InternalMessageInfo
224
225func (m *ProbabilitySampler) GetSamplingProbability() float64 {
226 if m != nil {
227 return m.SamplingProbability
228 }
229 return 0
230}
231
232// Sampler that always makes a constant decision on span sampling.
233type 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:"-"`
238}
239
240func (m *ConstantSampler) Reset() { *m = ConstantSampler{} }
241func (m *ConstantSampler) String() string { return proto.CompactTextString(m) }
242func (*ConstantSampler) ProtoMessage() {}
243func (*ConstantSampler) Descriptor() ([]byte, []int) {
244 return fileDescriptor_5359209b41ff50c5, []int{2}
245}
246
247func (m *ConstantSampler) XXX_Unmarshal(b []byte) error {
248 return xxx_messageInfo_ConstantSampler.Unmarshal(m, b)
249}
250func (m *ConstantSampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
251 return xxx_messageInfo_ConstantSampler.Marshal(b, m, deterministic)
252}
253func (m *ConstantSampler) XXX_Merge(src proto.Message) {
254 xxx_messageInfo_ConstantSampler.Merge(m, src)
255}
256func (m *ConstantSampler) XXX_Size() int {
257 return xxx_messageInfo_ConstantSampler.Size(m)
258}
259func (m *ConstantSampler) XXX_DiscardUnknown() {
260 xxx_messageInfo_ConstantSampler.DiscardUnknown(m)
261}
262
263var xxx_messageInfo_ConstantSampler proto.InternalMessageInfo
264
265func (m *ConstantSampler) GetDecision() ConstantSampler_ConstantDecision {
266 if m != nil {
267 return m.Decision
268 }
269 return ConstantSampler_ALWAYS_OFF
270}
271
272// Sampler that tries to sample with a rate per time window.
273type RateLimitingSampler struct {
274 // Rate per second.
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:"-"`
279}
280
281func (m *RateLimitingSampler) Reset() { *m = RateLimitingSampler{} }
282func (m *RateLimitingSampler) String() string { return proto.CompactTextString(m) }
283func (*RateLimitingSampler) ProtoMessage() {}
284func (*RateLimitingSampler) Descriptor() ([]byte, []int) {
285 return fileDescriptor_5359209b41ff50c5, []int{3}
286}
287
288func (m *RateLimitingSampler) XXX_Unmarshal(b []byte) error {
289 return xxx_messageInfo_RateLimitingSampler.Unmarshal(m, b)
290}
291func (m *RateLimitingSampler) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
292 return xxx_messageInfo_RateLimitingSampler.Marshal(b, m, deterministic)
293}
294func (m *RateLimitingSampler) XXX_Merge(src proto.Message) {
295 xxx_messageInfo_RateLimitingSampler.Merge(m, src)
296}
297func (m *RateLimitingSampler) XXX_Size() int {
298 return xxx_messageInfo_RateLimitingSampler.Size(m)
299}
300func (m *RateLimitingSampler) XXX_DiscardUnknown() {
301 xxx_messageInfo_RateLimitingSampler.DiscardUnknown(m)
302}
303
304var xxx_messageInfo_RateLimitingSampler proto.InternalMessageInfo
305
306func (m *RateLimitingSampler) GetQps() int64 {
307 if m != nil {
308 return m.Qps
309 }
310 return 0
311}
312
313func init() {
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")
319}
320
321func init() {
322 proto.RegisterFile("opencensus/proto/trace/v1/trace_config.proto", fileDescriptor_5359209b41ff50c5)
323}
324
325var fileDescriptor_5359209b41ff50c5 = []byte{
326 // 506 bytes of a gzipped FileDescriptorProto
327 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xc1, 0x6e, 0xd3, 0x30,
328 0x18, 0xc7, 0x97, 0x76, 0x6c, 0xec, 0x9b, 0xb6, 0x05, 0x57, 0x43, 0xa9, 0xb4, 0xc3, 0x94, 0x0b,
329 0x13, 0x22, 0x09, 0x1d, 0x07, 0x84, 0x90, 0x90, 0xda, 0x6e, 0x15, 0x87, 0xd2, 0x56, 0xd9, 0x44,
330 0x05, 0x97, 0xe0, 0x64, 0x6e, 0xb0, 0x68, 0xec, 0x60, 0x3b, 0xd5, 0x78, 0x0d, 0xce, 0x3c, 0x04,
331 0xcf, 0xc5, 0x53, 0xa0, 0x3a, 0x21, 0x49, 0xdb, 0x6d, 0xe2, 0x96, 0xef, 0xfb, 0x7f, 0xbf, 0x9f,
332 0xad, 0xd8, 0x86, 0x17, 0x3c, 0x25, 0x2c, 0x22, 0x4c, 0x66, 0xd2, 0x4b, 0x05, 0x57, 0xdc, 0x53,
333 0x02, 0x47, 0xc4, 0x5b, 0x74, 0xf2, 0x8f, 0x20, 0xe2, 0x6c, 0x46, 0x63, 0x57, 0x67, 0xa8, 0x5d,
334 0x4d, 0xe7, 0x1d, 0x57, 0x0f, 0xb9, 0x8b, 0x8e, 0xfd, 0x6b, 0x1b, 0xf6, 0xaf, 0x97, 0x45, 0x5f,
335 0x03, 0xe8, 0x0b, 0xb4, 0x52, 0xc1, 0x43, 0x1c, 0xd2, 0x39, 0x55, 0x3f, 0x02, 0x89, 0x93, 0x74,
336 0x4e, 0x84, 0x65, 0x9c, 0x1a, 0x67, 0xfb, 0xe7, 0x8e, 0x7b, 0xaf, 0xc8, 0x9d, 0x54, 0xd4, 0x55,
337 0x0e, 0xbd, 0xdf, 0xf2, 0x51, 0xba, 0xd1, 0x45, 0x53, 0x30, 0x23, 0xce, 0xa4, 0xc2, 0x4c, 0x95,
338 0xfa, 0x86, 0xd6, 0x3f, 0x7f, 0x40, 0xdf, 0x2f, 0x90, 0xca, 0x7d, 0x14, 0xad, 0xb6, 0xd0, 0x0d,
339 0x1c, 0x0b, 0xac, 0x48, 0x30, 0xa7, 0x09, 0x55, 0x94, 0xc5, 0xa5, 0xbd, 0xa9, 0xed, 0xee, 0x03,
340 0x76, 0x1f, 0x2b, 0x32, 0x2c, 0xb0, 0x6a, 0x85, 0x96, 0xd8, 0x6c, 0xa3, 0xd7, 0x60, 0x25, 0xf8,
341 0x36, 0x60, 0x59, 0x12, 0x12, 0x11, 0xf0, 0x59, 0x80, 0x95, 0x12, 0x34, 0xcc, 0x14, 0x91, 0xd6,
342 0xf6, 0xa9, 0x71, 0xd6, 0xf4, 0x8f, 0x13, 0x7c, 0x3b, 0xd2, 0xf1, 0x78, 0xd6, 0x2d, 0x43, 0xf4,
343 0x06, 0xda, 0x6b, 0x20, 0x63, 0x5c, 0x61, 0x45, 0x39, 0x93, 0xd6, 0x23, 0x4d, 0x3e, 0xad, 0x93,
344 0x55, 0x8a, 0xde, 0xc1, 0xc9, 0x2a, 0x9a, 0x10, 0x29, 0x71, 0x4c, 0x02, 0xb2, 0x20, 0x4c, 0x49,
345 0x6b, 0x47, 0xd3, 0x56, 0x8d, 0xfe, 0x90, 0x0f, 0x5c, 0xea, 0x1c, 0x39, 0xd0, 0x5a, 0xe5, 0xe7,
346 0x94, 0x7d, 0x93, 0xd6, 0xae, 0xc6, 0xcc, 0x1a, 0x36, 0x5c, 0xf6, 0x7b, 0x7b, 0xb0, 0x5b, 0xfc,
347 0x3a, 0x7b, 0x00, 0x68, 0xf3, 0x60, 0xd1, 0x4b, 0x68, 0xe9, 0x01, 0xca, 0xe2, 0x5a, 0xaa, 0x2f,
348 0x89, 0xe1, 0xdf, 0x15, 0xd9, 0xbf, 0x0d, 0x38, 0x5a, 0x3b, 0x42, 0x34, 0x85, 0xc7, 0x37, 0x24,
349 0xa2, 0x92, 0x72, 0xa6, 0xd1, 0xc3, 0xf3, 0xb7, 0xff, 0x7f, 0x01, 0xca, 0xfa, 0xa2, 0x50, 0xf8,
350 0xa5, 0xcc, 0xbe, 0x00, 0x73, 0x3d, 0x45, 0x87, 0x00, 0xdd, 0xe1, 0xb4, 0xfb, 0xe9, 0x2a, 0x18,
351 0x0f, 0x06, 0xe6, 0x16, 0x3a, 0x80, 0xbd, 0x7f, 0xf5, 0xc8, 0x34, 0xd0, 0x13, 0x38, 0x28, 0xca,
352 0x49, 0xd7, 0xbf, 0x1c, 0x5d, 0x9b, 0x0d, 0xfb, 0x19, 0xb4, 0xee, 0xb8, 0x16, 0xc8, 0x84, 0xe6,
353 0xf7, 0x54, 0xea, 0x0d, 0x37, 0xfd, 0xe5, 0x67, 0xef, 0xa7, 0x01, 0x27, 0x94, 0xdf, 0xbf, 0xf5,
354 0x9e, 0x59, 0x7b, 0x60, 0x93, 0x65, 0x34, 0x31, 0x3e, 0xf7, 0x62, 0xaa, 0xbe, 0x66, 0xa1, 0x1b,
355 0xf1, 0xc4, 0xcb, 0x29, 0x87, 0x32, 0xa9, 0x44, 0x96, 0x10, 0x96, 0x1f, 0xbb, 0x57, 0x09, 0x9d,
356 0xfc, 0x89, 0xc7, 0x84, 0x39, 0x71, 0xf5, 0xd2, 0xff, 0x34, 0xda, 0xe3, 0x94, 0xb0, 0x7e, 0xbe,
357 0xa6, 0x16, 0xbb, 0x7a, 0x25, 0xf7, 0x63, 0x27, 0xdc, 0xd1, 0xc8, 0xab, 0xbf, 0x01, 0x00, 0x00,
358 0xff, 0xff, 0x50, 0x0c, 0xfe, 0x32, 0x29, 0x04, 0x00, 0x00,
359}