Skip to content

Commit f4519a1

Browse files
committed
chore(cubestore): make trace_id and span_id suitable for open telemetry.
1 parent ce68576 commit f4519a1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

rust/cubestore/cubestore/src/cluster/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ use crate::queryplanner::query_executor::{QueryExecutor, SerializedRecordBatchSt
4141
use crate::queryplanner::serialized_plan::SerializedPlan;
4242
use crate::remotefs::RemoteFs;
4343
use crate::store::ChunkDataStore;
44-
use crate::telemetry::tracing::TracingHelper;
44+
use crate::telemetry::tracing::{TraceIdAndSpanId, TracingHelper};
4545
use crate::CubeError;
4646
use async_trait::async_trait;
4747
use datafusion::arrow::datatypes::SchemaRef;
@@ -215,7 +215,7 @@ pub enum WorkerMessage {
215215
SerializedPlan,
216216
HashMap<String, String>,
217217
HashMap<u64, Vec<SerializedRecordBatchStream>>,
218-
Option<(u64, u64)>,
218+
Option<TraceIdAndSpanId>,
219219
),
220220
}
221221

rust/cubestore/cubestore/src/telemetry/tracing.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ use crate::config::injection::DIService;
22
use crate::CubeError;
33
use std::sync::Arc;
44

5+
pub type TraceIdAndSpanId = (u128, u64);
6+
57
pub trait TracingHelper: DIService + Send + Sync {
6-
fn trace_and_span_id(&self) -> Option<(u64, u64)>;
8+
fn trace_and_span_id(&self) -> Option<TraceIdAndSpanId>;
79
}
810

911
pub struct TracingHelperImpl;
1012

1113
impl TracingHelper for TracingHelperImpl {
12-
fn trace_and_span_id(&self) -> Option<(u64, u64)> {
14+
fn trace_and_span_id(&self) -> Option<TraceIdAndSpanId> {
1315
None
1416
}
1517
}

0 commit comments

Comments
 (0)