Struct libeko::Message
[−]
[src]
pub struct Message { /* fields omitted */ }
The Echo Event Format items.
Methods
impl Message
[src]
pub fn set_routing_key(&mut self, val: String) -> &mut Self
[src]
The routing_key
is what identifies the message with an application.
It will become the ElasticSearch index. Valid characters are lowercase alpha numeric and '-'.
The key should follow the format
pub fn set_level(&mut self, val: Type) -> &mut Self
[src]
The message type. Additional types may be added in the future.
pub fn set_message(&mut self, val: String) -> &mut Self
[src]
A simple string message. Most messages should be one line of information.
If you have secondary, deeper information to store, put it in the message_detail
.
pub fn set_host(&mut self, val: Option<String>) -> &mut Self
[src]
Hostname where the message originated.
pub fn set_message_detail(
&mut self,
val: Option<HashMap<String, String>>
) -> &mut Self
[src]
&mut self,
val: Option<HashMap<String, String>>
) -> &mut Self
A place to store custom key/value pairs in the message, typically used when there isn't an appropriate root-level field.
pub fn set_timestamp(&mut self, val: i64) -> &mut Self
[src]
The timestamp of the event.
If producing your own messages, the format of the date should be either of:
- An ISO-8601 date/time string (e.g. 2018-04-06T17:23:00-04:00)
- A number representing milliseconds since epoch (e.g. 1491514054000). Note many timestamps are seconds since the epoch. That is incorrect for this usage.
pub fn set_correlation_id(&mut self, val: Option<Uuid>) -> &mut Self
[src]
The UUID that should be used to correlate message that are part of the same request or processing event. This can be used to correlate events across applications.
pub fn set_application_version(&mut self, val: Option<String>) -> &mut Self
[src]
Sets the version of the application that is creating this message.
pub fn set_client_hostname(&mut self, val: Option<String>) -> &mut Self
[src]
The hostname of a client if this message is involving an external system calling into your system.
pub fn set_destination_hostname(&mut self, val: Option<String>) -> &mut Self
[src]
The hostname of a destination system if this message is involving your system calling an external system.
pub fn set_destination_path(&mut self, val: Option<String>) -> &mut Self
[src]
The path being called on a destination system if this message is involving your system calling an external system.
pub fn set_start_timestamp(&mut self, val: Option<i64>) -> &mut Self
[src]
Sets the start time (timestamp of millis since the epoch) for the time at which this event started.
pub fn set_end_timestamp(&mut self, val: Option<i64>) -> &mut Self
[src]
Sets the start time (timestamp of millis since the epoch) for the time at which this event finished.
pub fn set_duration(&mut self, val: Option<u64>) -> &mut Self
[src]
Sets the duration (time in milliseconds) that passed during this event.
pub fn set_response_code(&mut self, val: Option<u16>) -> &mut Self
[src]
The HTTP response code returned by a performance event.
pub fn set_payload_size(&mut self, val: Option<u64>) -> &mut Self
[src]
The size of a request payload, typically associated with performance events.
pub fn set_response(&mut self, val: Option<String>) -> &mut Self
[src]
A more generic response used when a HTTP response code doesn't make sense. Typical values might be "success" or "failure".