Span Event • Rust AI Agent SDK
SpanEvent: An event within a span.
SpanEvent
Defined in the trace module.
Rust AI Agent SDK
An event within a span.
Fields
| Name | Type | Description |
|---|---|---|
name | String | Event name |
timestamp | Duration | Timestamp (as duration since trace start) |
attributes | HashMap<String | Attributes |
serde_json | :Value> | Attributes |
Methods
new
fn new(name: impl Into<String>, timestamp: Duration) -> SelfCreate a new event.
Parameters:
| Name | Type |
|---|---|
name | impl Into<String> |
timestamp | Duration |
with_attribute
fn with_attribute(mut self, key: impl Into<String>, value: impl Serialize) -> SelfAdd an attribute.
Parameters:
| Name | Type |
|---|---|
key | impl Into<String> |
value | impl Serialize |
Source
View on GitHubpraisonai/src/trace/mod.rs at line 175