1
#pragma once
2

            
3
namespace Envoy {
4
namespace Tracing {
5

            
6
/**
7
 * The reasons why trace sampling may or may not be performed.
8
 */
9
enum class Reason {
10
  // Not sampled based on supplied request id or other reason.
11
  NotTraceable,
12
  // Not sampled due to being a health check.
13
  HealthCheck,
14
  // Sampling enabled.
15
  Sampling,
16
  // Sampling forced by the service.
17
  ServiceForced,
18
  // Sampling forced by the client.
19
  ClientForced,
20
};
21

            
22
/**
23
 * The decision regarding whether traces should be sampled, and the reason for it.
24
 */
25
struct Decision {
26
  Reason reason;
27
  bool traced;
28
};
29

            
30
} // namespace Tracing
31
} // namespace Envoy