summaryrefslogtreecommitdiff
path: root/vendor/jonahgeorge/jaeger-client-php/src/Jaeger/Thrift/Agent/Zipkin/Span.php
blob: 32a69b64547ce0fc370990d8ff4be379f101fdf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<?php
namespace Jaeger\Thrift\Agent\Zipkin;

/**
 * Autogenerated by Thrift Compiler (0.11.0)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
use Thrift\Base\TBase;
use Thrift\Type\TType;
use Thrift\Type\TMessageType;
use Thrift\Exception\TException;
use Thrift\Exception\TProtocolException;
use Thrift\Protocol\TProtocol;
use Thrift\Protocol\TBinaryProtocolAccelerated;
use Thrift\Exception\TApplicationException;


/**
 * A trace is a series of spans (often RPC calls) which form a latency tree.
 * 
 * The root span is where trace_id = id and parent_id = Nil. The root span is
 * usually the longest interval in the trace, starting with a SERVER_RECV
 * annotation and ending with a SERVER_SEND.
 */
class Span extends TBase {
  static $isValidate = false;

  static $_TSPEC = array(
    1 => array(
      'var' => 'trace_id',
      'isRequired' => false,
      'type' => TType::I64,
      ),
    3 => array(
      'var' => 'name',
      'isRequired' => false,
      'type' => TType::STRING,
      ),
    4 => array(
      'var' => 'id',
      'isRequired' => false,
      'type' => TType::I64,
      ),
    5 => array(
      'var' => 'parent_id',
      'isRequired' => false,
      'type' => TType::I64,
      ),
    6 => array(
      'var' => 'annotations',
      'isRequired' => false,
      'type' => TType::LST,
      'etype' => TType::STRUCT,
      'elem' => array(
        'type' => TType::STRUCT,
        'class' => '\Jaeger\Thrift\Agent\Zipkin\Annotation',
        ),
      ),
    8 => array(
      'var' => 'binary_annotations',
      'isRequired' => false,
      'type' => TType::LST,
      'etype' => TType::STRUCT,
      'elem' => array(
        'type' => TType::STRUCT,
        'class' => '\Jaeger\Thrift\Agent\Zipkin\BinaryAnnotation',
        ),
      ),
    9 => array(
      'var' => 'debug',
      'isRequired' => false,
      'type' => TType::BOOL,
      ),
    10 => array(
      'var' => 'timestamp',
      'isRequired' => false,
      'type' => TType::I64,
      ),
    11 => array(
      'var' => 'duration',
      'isRequired' => false,
      'type' => TType::I64,
      ),
    12 => array(
      'var' => 'trace_id_high',
      'isRequired' => false,
      'type' => TType::I64,
      ),
    );

  /**
   * @var int
   */
  public $trace_id = null;
  /**
   * Span name in lowercase, rpc method for example
   * 
   * Conventionally, when the span name isn't known, name = "unknown".
   * 
   * @var string
   */
  public $name = null;
  /**
   * @var int
   */
  public $id = null;
  /**
   * @var int
   */
  public $parent_id = null;
  /**
   * @var \Jaeger\Thrift\Agent\Zipkin\Annotation[]
   */
  public $annotations = null;
  /**
   * @var \Jaeger\Thrift\Agent\Zipkin\BinaryAnnotation[]
   */
  public $binary_annotations = null;
  /**
   * @var bool
   */
  public $debug = false;
  /**
   * Microseconds from epoch of the creation of this span.
   * 
   * This value should be set directly by instrumentation, using the most
   * precise value possible. For example, gettimeofday or syncing nanoTime
   * against a tick of currentTimeMillis.
   * 
   * For compatibilty with instrumentation that precede this field, collectors
   * or span stores can derive this via Annotation.timestamp.
   * For example, SERVER_RECV.timestamp or CLIENT_SEND.timestamp.
   * 
   * This field is optional for compatibility with old data: first-party span
   * stores are expected to support this at time of introduction.
   * 
   * @var int
   */
  public $timestamp = null;
  /**
   * Measurement of duration in microseconds, used to support queries.
   * 
   * This value should be set directly, where possible. Doing so encourages
   * precise measurement decoupled from problems of clocks, such as skew or NTP
   * updates causing time to move backwards.
   * 
   * For compatibilty with instrumentation that precede this field, collectors
   * or span stores can derive this by subtracting Annotation.timestamp.
   * For example, SERVER_SEND.timestamp - SERVER_RECV.timestamp.
   * 
   * If this field is persisted as unset, zipkin will continue to work, except
   * duration query support will be implementation-specific. Similarly, setting
   * this field non-atomically is implementation-specific.
   * 
   * This field is i64 vs i32 to support spans longer than 35 minutes.
   * 
   * @var int
   */
  public $duration = null;
  /**
   * Optional unique 8-byte additional identifier for a trace. If non zero, this
   * means the trace uses 128 bit traceIds instead of 64 bit.
   * 
   * @var int
   */
  public $trace_id_high = null;

  public function __construct($vals=null) {
    if (is_array($vals)) {
      parent::__construct(self::$_TSPEC, $vals);
    }
  }

  public function getName() {
    return 'Span';
  }

  public function read($input)
  {
    return $this->_read('Span', self::$_TSPEC, $input);
  }

  public function write($output) {
    return $this->_write('Span', self::$_TSPEC, $output);
  }

}