Class: OpenCensus::Trace::MessageEvent
- Defined in:
- lib/opencensus/trace/message_event.rb
Overview
An event describing a message sent/received between Spans.
Constant Summary collapse
- TYPE_UNSPECIFIED =
An event type, indicating the type is unknown.
:TYPE_UNSPECIFIED
- SENT =
An event type, indicating a sent message.
:SENT
- RECEIVED =
An event type, indicating a received message.
:RECEIVED
Instance Attribute Summary collapse
-
#compressed_size ⇒ Integer
readonly
The number of compressed bytes sent or received.
-
#id ⇒ Integer
readonly
An identifier for the MessageEvent's message that can be used to match SENT and RECEIVED MessageEvents.
-
#type ⇒ Symbol
readonly
The type of MessageEvent.
-
#uncompressed_size ⇒ Integer
readonly
The number of uncompressed bytes sent or received.
Attributes inherited from TimeEvent
Instance Attribute Details
#compressed_size ⇒ Integer (readonly)
The number of compressed bytes sent or received. If zero, assumed to be the same size as uncompressed.
73 74 75 |
# File 'lib/opencensus/trace/message_event.rb', line 73 def compressed_size @compressed_size end |
#id ⇒ Integer (readonly)
An identifier for the MessageEvent's message that can be used to match SENT and RECEIVED MessageEvents. For example, this field could represent a sequence ID for a streaming RPC. It is recommended to be unique within a Span.
58 59 60 |
# File 'lib/opencensus/trace/message_event.rb', line 58 def id @id end |
#type ⇒ Symbol (readonly)
The type of MessageEvent. Indicates whether the message was sent or received. You should use the type constants provided by this class.
48 49 50 |
# File 'lib/opencensus/trace/message_event.rb', line 48 def type @type end |
#uncompressed_size ⇒ Integer (readonly)
The number of uncompressed bytes sent or received.
65 66 67 |
# File 'lib/opencensus/trace/message_event.rb', line 65 def uncompressed_size @uncompressed_size end |