emit!() { /* proc-macro */ }
Expand description
Emit an event.
§Syntax
(control_param),* tpl, (property),*
where
control_param
: A Rust field-value with a pre-determined identifier (see below).tpl
: A template string literal.property
: A Rust field-value for a property to capture.
§Control parameters
This macro accepts the following optional control parameters:
name | type | description |
---|---|---|
rt | impl emit::runtime::Runtime | The runtime to emit the event through. |
mdl | impl Into<emit::Path> | The module the event belongs to. If unspecified the current module path is used. |
extent | impl emit::ToExtent | The extent to use on the event. If it resolves to None then the clock on the runtime will be used to assign a point extent. |
props | impl emit::Props | A base set of properties to add to the event. |
evt | impl emit::event::ToEvent | A base event to emit. Any properties captured by the macro will be appended to the base event. If this control parameter is specified then mdl , props , and extent cannot also be set. |
when | impl emit::Filter | A filter to use instead of the one configured on the runtime. |
§Template
The template for the event. See the tpl
macro for syntax.
§Properties
Properties that appear within the template or after it are added to the emitted event. The identifier of the property is its key. Property capturing can be adjusted through the as_*
attribute macros.