Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Commit

Permalink
some better span names
Browse files Browse the repository at this point in the history
  • Loading branch information
KodrAus committed Apr 10, 2024
1 parent 5bc0b53 commit 8cdffa4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion targets/file/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ impl Worker {
}
}

#[emit::span(rt: emit::runtime::internal(), arg: span, "on_batch")]
#[emit::span(rt: emit::runtime::internal(), arg: span, "write file batch")]
fn on_batch(&mut self, mut batch: EventBatch) -> Result<(), BatchError<EventBatch>> {
let now = std::time::UNIX_EPOCH.elapsed().unwrap();
let ts = emit::Timestamp::new(now).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion targets/otlp/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ enum OtlpTransport<R> {
}

impl<R: data::RequestEncoder> OtlpTransport<R> {
#[emit::span(rt: emit::runtime::internal(), arg: span, "send")]
#[emit::span(rt: emit::runtime::internal(), arg: span, "send OTLP batch of {batch_size} events", batch_size: batch.len())]
pub(crate) async fn send(
&self,
batch: Vec<PreEncoded>,
Expand Down
1 change: 1 addition & 0 deletions tests/smoke-test/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ async fn main() {
emit::emit!(
extent: timer,
"{metric_agg} of {metric_name} is {metric_value}",
event_kind: "metric",
metric_agg: "count",
metric_name: "smoke_test::sum",
#[emit::as_value]
Expand Down

0 comments on commit 8cdffa4

Please sign in to comment.