1
#pragma once
2
#include <string>
3

            
4
#include "source/common/protobuf/protobuf.h"
5

            
6
#include "absl/container/flat_hash_map.h"
7

            
8
namespace Envoy {
9
namespace Extensions {
10
namespace Tracers {
11
namespace XRay {
12

            
13
/**
14
 * X-Ray configuration Model.
15
 */
16
struct XRayConfiguration {
17
  const std::string daemon_endpoint_;
18
  const std::string segment_name_;
19
  const std::string sampling_rules_;
20
  const std::string origin_;
21
  const absl::flat_hash_map<std::string, Protobuf::Value> aws_metadata_;
22
};
23

            
24
enum class SamplingDecision {
25
  Unknown, // default
26
  Sampled,
27
  NotSampled,
28
};
29

            
30
/**
31
 * X-Ray header Model.
32
 */
33
struct XRayHeader {
34
  std::string trace_id_;
35
  std::string parent_id_;
36
  SamplingDecision sample_decision_{};
37
};
38

            
39
} // namespace XRay
40
} // namespace Tracers
41
} // namespace Extensions
42
} // namespace Envoy