class OpenCensus::Trace::MessageEvent

An event describing a message sent/received between Spans.

Constants

RECEIVED

An event type, indicating a received message. @return [Symbol]

SENT

An event type, indicating a sent message. @return [Symbol]

TYPE_UNSPECIFIED

An event type, indicating the type is unknown. @return [Symbol]

Attributes

compressed_size[R]

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

@return [Integer]

id[R]

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.

@return [Integer]

type[R]

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

@return [Symbol]

uncompressed_size[R]

The number of uncompressed bytes sent or received.

@return [Integer]

Public Class Methods

new(type, id, uncompressed_size, compressed_size: 0, time: nil) click to toggle source

Create a new MessageEvent object.

@private

Calls superclass method
# File lib/opencensus/trace/message_event.rb, line 80
def initialize type, id, uncompressed_size, compressed_size: 0,
               time: nil
  super time: time
  @type = type
  @id = id
  @uncompressed_size = uncompressed_size
  @compressed_size = compressed_size
end