Class: OpenCensus::Trace::MessageEvent

Inherits:
TimeEvent
  • Object
show all
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.

Returns:

  • (Symbol)
:TYPE_UNSPECIFIED
SENT =

An event type, indicating a sent message.

Returns:

  • (Symbol)
:SENT
RECEIVED =

An event type, indicating a received message.

Returns:

  • (Symbol)
:RECEIVED

Instance Attribute Summary collapse

Attributes inherited from TimeEvent

#time

Instance Attribute Details

#compressed_sizeInteger (readonly)

The number of compressed bytes sent or received. If zero, assumed to be the same size as uncompressed.

Returns:

  • (Integer)


73
74
75
# File 'lib/opencensus/trace/message_event.rb', line 73

def compressed_size
  @compressed_size
end

#idInteger (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.

Returns:

  • (Integer)


58
59
60
# File 'lib/opencensus/trace/message_event.rb', line 58

def id
  @id
end

#typeSymbol (readonly)

The type of MessageEvent. Indicates whether the message was sent or received. You should use the type constants provided by this class.

Returns:

  • (Symbol)


48
49
50
# File 'lib/opencensus/trace/message_event.rb', line 48

def type
  @type
end

#uncompressed_sizeInteger (readonly)

The number of uncompressed bytes sent or received.

Returns:

  • (Integer)


65
66
67
# File 'lib/opencensus/trace/message_event.rb', line 65

def uncompressed_size
  @uncompressed_size
end