silk.trace.values.
Bounded, owned attribute values used by recorded spans, logs and metrics.
Import as Attributes with import silk.trace.values { Attributes }.
Public declarations: 4.
Text#
pub struct TextAt most 64 UTF-8 bytes, owned by the record.
Implementation Copy for Text#
impl Copy for TextImplementation Text#
impl TextAssociated function empty#
pub fn empty() -> SelfReturns an empty text value.
Method view#
pub fn view(self: &Self) -> stringBorrows the valid UTF-8 prefix. A scalar split at capacity is omitted.
Associated function render#
pub fn render<Args>(static template: string<'static>, args: &Args) -> SelfFormats a log template into fixed record storage.
Associated function display#
pub fn display<V: Display>(value: &V) -> SelfFormats one displayable attribute into fixed record storage.
Implementation Writer for Text#
impl Writer for TextOperation writeAll#
writeAll: Text.writeAllOperation flush#
flush: Text.flushValue#
pub union ValueAn OpenTelemetry scalar, including signed and unsigned Silk integers.
Bool#
BoolField value#
pub value: boolInteger#
IntegerField value#
pub value: i64Unsigned#
UnsignedField value#
pub value: u64Double#
DoubleField value#
pub value: f64Text#
TextField value#
pub value: TextImplementation Copy for Value#
impl Copy for ValueImplementation Value#
impl ValueAssociated function capture#
pub fn capture<V>(value: &V) -> SelfKeeps primitive values typed and captures other values through their Display implementation.
Method equivalent#
pub fn equivalent(self: &Self, other: &Self) -> boolCompares attribute type and value.
Attribute#
pub struct AttributeOne static key and its owned value.
Field key#
pub key: string<'static>The field or user-supplied key.
Field value#
pub value: ValueThe value captured during observation.
Implementation Copy for Attribute#
impl Copy for AttributeAttributes#
pub struct AttributesUp to eight distinct keys. Updates to an existing key replace its value.
Field items#
pub items: [Attribute; 8]Attribute storage. Only the first count entries are populated.
Field count#
pub count: usizeNumber of distinct keys captured.
Field dropped#
pub dropped: u64Number of additional keys omitted at capacity.
Implementation Copy for Attributes#
impl Copy for AttributesImplementation Attributes#
impl AttributesAssociated function empty#
pub fn empty() -> SelfCreates an empty set.
Method set#
pub fn set<V>(self: &mut Self, static key: string<'static>, value: &V) -> ()Sets a typed value or increments the dropped count when storage is full.
Method setCaptured#
pub fn setCaptured(self: &mut Self, static key: string<'static>, value: Value) -> ()Stores an already-captured value, without invoking user formatting.
Method fields#
pub fn fields<Args>(self: &mut Self, args: &Args) -> ()Collects the named fields of an argument record.
Associated function make#
pub fn make<Args>(args: &Args) -> SelfCaptures the named fields of an argument record into a fresh set.
Method equivalent#
pub fn equivalent(self: &Self, other: &Self) -> boolCompares keys and values independently of insertion order.
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, wasm32-wasip1, wasm32-wasip2, x86_64-pc-windows-msvc, wasm64-unknown-unknown.