]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/jaeger-client-cpp/idl/thrift/sampling.thrift
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / jaegertracing / jaeger-client-cpp / idl / thrift / sampling.thrift
CommitLineData
f67539c2
TL
1# Copyright (c) 2016 Uber Technologies, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15namespace cpp jaegertracing.sampling_manager.thrift
16namespace java io.jaegertracing.thrift.sampling_manager
17namespace php Jaeger.Thrift.Agent
18namespace netcore Jaeger.Thrift.Agent
19
20enum SamplingStrategyType { PROBABILISTIC, RATE_LIMITING }
21
22// ProbabilisticSamplingStrategy randomly samples a fixed percentage of all traces.
23struct ProbabilisticSamplingStrategy {
24 1: required double samplingRate // percentage expressed as rate (0..1]
25}
26
27// RateLimitingStrategy samples traces with a rate that does not exceed specified number of traces per second.
28// The recommended implementation approach is leaky bucket.
29struct RateLimitingSamplingStrategy {
30 1: required i16 maxTracesPerSecond
31}
32
33// OperationSamplingStrategy defines a sampling strategy that randomly samples a fixed percentage of operation traces.
34struct OperationSamplingStrategy {
35 1: required string operation
36 2: required ProbabilisticSamplingStrategy probabilisticSampling
37}
38
39// PerOperationSamplingStrategies defines a sampling strategy per each operation name in the service
40// with a guaranteed lower bound per second. Once the lower bound is met, operations are randomly sampled
41// at a fixed percentage.
42struct PerOperationSamplingStrategies {
43 1: required double defaultSamplingProbability
44 2: required double defaultLowerBoundTracesPerSecond
45 3: required list<OperationSamplingStrategy> perOperationStrategies
46 4: optional double defaultUpperBoundTracesPerSecond
47}
48
49struct SamplingStrategyResponse {
50 1: required SamplingStrategyType strategyType
51 2: optional ProbabilisticSamplingStrategy probabilisticSampling
52 3: optional RateLimitingSamplingStrategy rateLimitingSampling
53 4: optional PerOperationSamplingStrategies operationSampling
54}
55
56service SamplingManager {
57 SamplingStrategyResponse getSamplingStrategy(1: string serviceName)
58}