@Immutable public final class MessageEvent extends Object implements io.opentelemetry.trace.Event
It requires a type and a message id that serves to uniquely identify each
message. It can optionally have information about the message size.
| Modifier and Type | Class and Description |
|---|---|
static class |
MessageEvent.Type
Available types for a
MessageEvent. |
| Modifier and Type | Method and Description |
|---|---|
static MessageEvent |
create(MessageEvent.Type type,
long messageId,
long uncompressedSize,
long compressedSize)
Returns a
MessageEvent with the desired values. |
io.opentelemetry.common.Attributes |
getAttributes() |
String |
getName() |
public static MessageEvent create(MessageEvent.Type type, long messageId, long uncompressedSize, long compressedSize)
MessageEvent with the desired values.type - designates whether this is a send or receive message.messageId - serves to uniquely identify each message.uncompressedSize - represents the uncompressed size in bytes of this message. If not
available use 0.compressedSize - represents the compressed size in bytes of this message. If not available
use 0.MessageEvent with the desired values.NullPointerException - if type is null.public String getName()
getName in interface io.opentelemetry.trace.Eventpublic io.opentelemetry.common.Attributes getAttributes()
getAttributes in interface io.opentelemetry.trace.Event