Skip to content

Commit 4dc4734

Browse files
adarsh0728vigith
andauthored
feat: add OTLP export into tracing setup with context propagation helpers (#3385)
Signed-off-by: adarsh0728 <gooneriitk@gmail.com> Signed-off-by: Vigith Maurice <vigith@gmail.com> Co-authored-by: Vigith Maurice <vigith@gmail.com>
1 parent 4ffd0b1 commit 4dc4734

8 files changed

Lines changed: 1018 additions & 29 deletions

File tree

rust/Cargo.lock

Lines changed: 108 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ tokio-stream = "0.1.17"
8383
tokio-util = { version = "0.7", features = ["rt"] }
8484
bytes = "1.11.1"
8585
tracing = "0.1.41"
86+
tracing-opentelemetry = "0.32"
87+
opentelemetry = "0.31"
88+
opentelemetry_sdk = "0.31"
89+
opentelemetry-otlp = { version = "0.31", features = ["grpc-tonic"] }
8690
async-nats = "0.44.2"
8791
thiserror = "2.0.12"
8892
axum = { version = "0.8.4", default-features = false, features = [

rust/numaflow-core/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ tokio.workspace = true
1919
tokio-stream.workspace = true
2020
tokio-util.workspace = true
2121
tracing.workspace = true
22+
tracing-opentelemetry.workspace = true
23+
opentelemetry = { workspace = true }
24+
opentelemetry_sdk = { workspace = true, features = ["rt-tokio"] }
2225
numaflow-pulsar.workspace = true
2326
numaflow-monitor.workspace = true
2427
numaflow-nats.workspace = true

rust/numaflow-core/src/shared.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ pub(crate) mod create_components;
1111
/// Shared methods for forwarding messages.
1212
pub(crate) mod forward;
1313

14+
/// OpenTelemetry propagation helpers for distributed tracing.
15+
/// Functions in this module are consumed by span creation code in source, mapper, and sinker.
16+
#[allow(dead_code)]
17+
pub(crate) mod otel;
18+
1419
/// Test server framework: helpers for spinning up numaflow SDK gRPC servers in tests.
1520
#[cfg(test)]
1621
pub(crate) mod test_utils;

0 commit comments

Comments
 (0)