mirror of
https://github.com/katanemo/plano.git
synced 2026-05-11 08:42:48 +02:00
cargo clippy (#660)
This commit is contained in:
parent
c75e7606f9
commit
ca95ffb63d
62 changed files with 1864 additions and 1187 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use super::shapes::{Span, Attribute, AttributeValue};
|
||||
use super::shapes::{Attribute, AttributeValue, Span};
|
||||
use std::collections::HashMap;
|
||||
use std::time::SystemTime;
|
||||
|
||||
|
|
@ -116,10 +116,11 @@ impl SpanBuilder {
|
|||
let end_nanos = system_time_to_nanos(end_time);
|
||||
|
||||
// Generate trace_id if not provided
|
||||
let trace_id = self.trace_id.unwrap_or_else(|| generate_random_trace_id());
|
||||
let trace_id = self.trace_id.unwrap_or_else(generate_random_trace_id);
|
||||
|
||||
// Create attributes in OTEL format
|
||||
let attributes: Vec<Attribute> = self.attributes
|
||||
let attributes: Vec<Attribute> = self
|
||||
.attributes
|
||||
.into_iter()
|
||||
.map(|(key, value)| Attribute {
|
||||
key,
|
||||
|
|
@ -132,7 +133,7 @@ impl SpanBuilder {
|
|||
// Build span directly without going through Span::new()
|
||||
Span {
|
||||
trace_id,
|
||||
span_id: self.span_id.unwrap_or_else(|| generate_random_span_id()),
|
||||
span_id: self.span_id.unwrap_or_else(generate_random_span_id),
|
||||
parent_span_id: self.parent_span_id,
|
||||
name: self.name,
|
||||
start_time_unix_nano: format!("{}", start_nanos),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue