Exemplar
extends Message
in package
A representation of an exemplar, which is a sample input measurement.
Exemplars also hold information about the environment when the measurement was recorded, for example the span and trace ID of the active span when the exemplar was recorded.
Generated from protobuf message opentelemetry.proto.metrics.v1.Exemplar
Table of Contents
Properties
- $span_id : mixed
- (Optional) Span ID of the exemplar trace.
- $time_unix_nano : mixed
- time_unix_nano is the exact time when this exemplar was recorded Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
- $trace_id : mixed
- (Optional) Trace ID of the exemplar trace.
- $value : mixed
- $filtered_attributes : mixed
- The set of key/value pairs that were filtered out by the aggregator, but recorded alongside the original measurement. Only key/value pairs that were filtered out by the aggregator should be included
Methods
- __construct() : mixed
- Constructor.
- getAsDouble() : float
- Generated from protobuf field <code>double as_double = 3;</code>
- getAsInt() : int|string
- Generated from protobuf field <code>sfixed64 as_int = 6;</code>
- getFilteredAttributes() : RepeatedField
- The set of key/value pairs that were filtered out by the aggregator, but recorded alongside the original measurement. Only key/value pairs that were filtered out by the aggregator should be included
- getSpanId() : string
- (Optional) Span ID of the exemplar trace.
- getTimeUnixNano() : int|string
- time_unix_nano is the exact time when this exemplar was recorded Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
- getTraceId() : string
- (Optional) Trace ID of the exemplar trace.
- getValue() : string
- hasAsDouble() : mixed
- hasAsInt() : mixed
- setAsDouble() : $this
- Generated from protobuf field <code>double as_double = 3;</code>
- setAsInt() : $this
- Generated from protobuf field <code>sfixed64 as_int = 6;</code>
- setFilteredAttributes() : $this
- The set of key/value pairs that were filtered out by the aggregator, but recorded alongside the original measurement. Only key/value pairs that were filtered out by the aggregator should be included
- setSpanId() : $this
- (Optional) Span ID of the exemplar trace.
- setTimeUnixNano() : $this
- time_unix_nano is the exact time when this exemplar was recorded Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
- setTraceId() : $this
- (Optional) Trace ID of the exemplar trace.
Properties
$span_id
(Optional) Span ID of the exemplar trace.
protected
mixed
$span_id
= ''
span_id may be missing if the measurement is not recorded inside a trace or if the trace is not sampled.
Generated from protobuf field bytes span_id = 4;
$time_unix_nano
time_unix_nano is the exact time when this exemplar was recorded Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
protected
mixed
$time_unix_nano
= 0
Generated from protobuf field fixed64 time_unix_nano = 2;
$trace_id
(Optional) Trace ID of the exemplar trace.
protected
mixed
$trace_id
= ''
trace_id may be missing if the measurement is not recorded inside a trace or if the trace is not sampled.
Generated from protobuf field bytes trace_id = 5;
$value
protected
mixed
$value
$filtered_attributes
The set of key/value pairs that were filtered out by the aggregator, but recorded alongside the original measurement. Only key/value pairs that were filtered out by the aggregator should be included
private
mixed
$filtered_attributes
Generated from protobuf field repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $data = NULL ]) : mixed
Parameters
- $data : array<string|int, mixed> = NULL
-
{ Optional. Data for populating the Message object.
@type \Opentelemetry\Proto\Common\V1\KeyValue[]|\Google\Protobuf\Internal\RepeatedField $filtered_attributes The set of key/value pairs that were filtered out by the aggregator, but recorded alongside the original measurement. Only key/value pairs that were filtered out by the aggregator should be included @type int|string $time_unix_nano time_unix_nano is the exact time when this exemplar was recorded Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. @type float $as_double @type int|string $as_int @type string $span_id (Optional) Span ID of the exemplar trace. span_id may be missing if the measurement is not recorded inside a trace or if the trace is not sampled. @type string $trace_id (Optional) Trace ID of the exemplar trace. trace_id may be missing if the measurement is not recorded inside a trace or if the trace is not sampled.
}
getAsDouble()
Generated from protobuf field <code>double as_double = 3;</code>
public
getAsDouble() : float
Return values
floatgetAsInt()
Generated from protobuf field <code>sfixed64 as_int = 6;</code>
public
getAsInt() : int|string
Return values
int|stringgetFilteredAttributes()
The set of key/value pairs that were filtered out by the aggregator, but recorded alongside the original measurement. Only key/value pairs that were filtered out by the aggregator should be included
public
getFilteredAttributes() : RepeatedField
Generated from protobuf field repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
Return values
RepeatedFieldgetSpanId()
(Optional) Span ID of the exemplar trace.
public
getSpanId() : string
span_id may be missing if the measurement is not recorded inside a trace or if the trace is not sampled.
Generated from protobuf field bytes span_id = 4;
Return values
stringgetTimeUnixNano()
time_unix_nano is the exact time when this exemplar was recorded Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
public
getTimeUnixNano() : int|string
Generated from protobuf field fixed64 time_unix_nano = 2;
Return values
int|stringgetTraceId()
(Optional) Trace ID of the exemplar trace.
public
getTraceId() : string
trace_id may be missing if the measurement is not recorded inside a trace or if the trace is not sampled.
Generated from protobuf field bytes trace_id = 5;
Return values
stringgetValue()
public
getValue() : string
Return values
stringhasAsDouble()
public
hasAsDouble() : mixed
hasAsInt()
public
hasAsInt() : mixed
setAsDouble()
Generated from protobuf field <code>double as_double = 3;</code>
public
setAsDouble(float $var) : $this
Parameters
- $var : float
Return values
$thissetAsInt()
Generated from protobuf field <code>sfixed64 as_int = 6;</code>
public
setAsInt(int|string $var) : $this
Parameters
- $var : int|string
Return values
$thissetFilteredAttributes()
The set of key/value pairs that were filtered out by the aggregator, but recorded alongside the original measurement. Only key/value pairs that were filtered out by the aggregator should be included
public
setFilteredAttributes(array<string|int, KeyValue>|RepeatedField $var) : $this
Generated from protobuf field repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
Parameters
- $var : array<string|int, KeyValue>|RepeatedField
Return values
$thissetSpanId()
(Optional) Span ID of the exemplar trace.
public
setSpanId(string $var) : $this
span_id may be missing if the measurement is not recorded inside a trace or if the trace is not sampled.
Generated from protobuf field bytes span_id = 4;
Parameters
- $var : string
Return values
$thissetTimeUnixNano()
time_unix_nano is the exact time when this exemplar was recorded Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
public
setTimeUnixNano(int|string $var) : $this
Generated from protobuf field fixed64 time_unix_nano = 2;
Parameters
- $var : int|string
Return values
$thissetTraceId()
(Optional) Trace ID of the exemplar trace.
public
setTraceId(string $var) : $this
trace_id may be missing if the measurement is not recorded inside a trace or if the trace is not sampled.
Generated from protobuf field bytes trace_id = 5;
Parameters
- $var : string