Skip to content

Commit 63eb25b

Browse files
committed
feat(rust): integrate the new span exporter with the rest of the application
1 parent 6fb11e6 commit 63eb25b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+995
-826
lines changed

Cargo.lock

+33-32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

NOTICE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ This file contains attributions for any 3rd-party open source code used in this
200200
| ff | MIT, Apache-2.0 | https://crates.io/crates/ff |
201201
| fiat-crypto | MIT, Apache-2.0, BSD-1-Clause | https://crates.io/crates/fiat-crypto |
202202
| flate2 | MIT, Apache-2.0 | https://crates.io/crates/flate2 |
203-
| flexi_logger | MIT, Apache-2.0 | https://crates.io/crates/flexi_logger |
204203
| flume | Apache-2.0, MIT | https://crates.io/crates/flume |
205204
| fnv | Apache-2.0, MIT | https://crates.io/crates/fnv |
206205
| foldhash | Zlib | https://crates.io/crates/foldhash |
@@ -364,6 +363,7 @@ This file contains attributions for any 3rd-party open source code used in this
364363
| openssl-probe | MIT, Apache-2.0 | https://crates.io/crates/openssl-probe |
365364
| opentelemetry | Apache-2.0 | https://crates.io/crates/opentelemetry |
366365
| opentelemetry-appender-tracing | Apache-2.0 | https://crates.io/crates/opentelemetry-appender-tracing |
366+
| opentelemetry-http | Apache-2.0 | https://crates.io/crates/opentelemetry-http |
367367
| opentelemetry-otlp | Apache-2.0 | https://crates.io/crates/opentelemetry-otlp |
368368
| opentelemetry-proto | Apache-2.0 | https://crates.io/crates/opentelemetry-proto |
369369
| opentelemetry-semantic-conventions | Apache-2.0 | https://crates.io/crates/opentelemetry-semantic-conventions |

examples/rust/get_started/examples/06-credentials-exchange-client.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async fn main(ctx: Context) -> Result<()> {
4949
// as a member of the production cluster so it returns a signed credential
5050
// attesting to that knowledge.
5151
let authority_node = NodeManager::authority_node_client(
52-
&tcp,
52+
tcp.clone(),
5353
node.secure_channels().clone(),
5454
&issuer,
5555
&MultiAddr::try_from("/dnsaddr/localhost/tcp/5000/secure/api")?,

examples/rust/get_started/examples/06-credentials-exchange-server.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async fn main(ctx: Context) -> Result<()> {
5252
// as a member of the production cluster so it returns a signed credential
5353
// attesting to that knowledge.
5454
let authority_node = NodeManager::authority_node_client(
55-
&tcp,
55+
tcp.clone(),
5656
node.secure_channels().clone(),
5757
&issuer,
5858
&MultiAddr::try_from("/dnsaddr/localhost/tcp/5000/secure/api").unwrap(),

examples/rust/get_started/examples/11-attribute-based-authentication-control-plane.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async fn start_node(ctx: Context, project_information_path: &str, token: OneTime
6464
// create a secure channel to the authority
6565
// when creating the channel we check that the opposite side is indeed presenting the authority identity
6666
let authority_node = NodeManager::authority_node_client(
67-
&tcp,
67+
tcp.clone(),
6868
node.secure_channels().clone(),
6969
&control_plane,
7070
&MultiAddr::try_from("/dnsaddr/localhost/tcp/5000")?,
@@ -82,7 +82,7 @@ async fn start_node(ctx: Context, project_information_path: &str, token: OneTime
8282
// Create a credential retriever that will be used to obtain credentials
8383
let credential_retriever = Arc::new(RemoteCredentialRetrieverCreator::new(
8484
node.context().try_clone()?,
85-
Arc::new(tcp.clone()),
85+
tcp.clone(),
8686
node.secure_channels(),
8787
RemoteCredentialRetrieverInfo::create_for_project_member(
8888
project.authority_identifier(),

examples/rust/get_started/examples/11-attribute-based-authentication-edge-plane.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async fn start_node(ctx: Context, project_information_path: &str, token: OneTime
6161
// create a secure channel to the authority
6262
// when creating the channel we check that the opposite side is indeed presenting the authority identity
6363
let authority_node = NodeManager::authority_node_client(
64-
&tcp,
64+
tcp.clone(),
6565
node.secure_channels().clone(),
6666
&edge_plane,
6767
&MultiAddr::try_from("/dnsaddr/localhost/tcp/5000")?,
@@ -80,7 +80,7 @@ async fn start_node(ctx: Context, project_information_path: &str, token: OneTime
8080
// Create a credential retriever that will be used to obtain credentials
8181
let credential_retriever = Arc::new(RemoteCredentialRetrieverCreator::new(
8282
node.context().try_clone()?,
83-
Arc::new(tcp.clone()),
83+
tcp.clone(),
8484
node.secure_channels(),
8585
RemoteCredentialRetrieverInfo::create_for_project_member(
8686
project.authority_identifier(),

implementations/rust/ockam/ockam_api/Cargo.toml

+11-12
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ colorful = "0.3"
5858
colors-transform = "0.2"
5959
dialoguer = "0.11"
6060
either = { version = "1.13.0", default-features = false }
61-
flexi_logger = "0.28"
6261
futures = { version = "0.3.30", features = [] }
62+
futures-core = "0.3.31"
6363
gethostname = "0.5.0"
6464
hex = { version = "0.4.3", default-features = false, features = ["alloc", "serde"] }
6565
home = "0.5"
6666
http-body-util = "0"
6767
httparse = "1.9.5"
68-
hyper = { version = "1", default-features = false, features = ["server", "http1"] }
68+
hyper = { version = "1", default-features = false, features = ["server", "http1", "client"] }
6969
hyper-util = { version = "0", default-features = false, features = ["server", "http1", "tokio"] }
7070
indicatif = "0.17"
7171
itertools = "0.13.0"
@@ -80,12 +80,12 @@ nix = { version = "0.29", features = ["signal"] }
8080
nu-ansi-term = "0.50"
8181
once_cell = { version = "1", default-features = false }
8282
open = "5.3.0"
83-
opentelemetry = { version = "0.26.0", features = ["logs", "metrics", "trace"] }
84-
opentelemetry-appender-tracing = { version = "0.26.0" }
85-
opentelemetry-otlp = { version = "0.26.0", features = ["logs", "metrics", "trace", "grpc-tonic", "tls", "tls-roots"], default-features = false }
86-
opentelemetry-proto = { version = "0.26.1", features = ["full"] }
87-
opentelemetry-semantic-conventions = { version = "0.26.0", features = ["semconv_experimental"] }
88-
opentelemetry_sdk = { version = "0.26.0", features = ["logs", "metrics", "trace", "rt-tokio", "rt-tokio-current-thread", "testing", "logs_level_enabled"], default-features = false }
83+
opentelemetry = { version = "0.27", features = ["logs", "metrics", "trace"] }
84+
opentelemetry-appender-tracing = { version = "0.27" }
85+
opentelemetry-otlp = { version = "0.27", features = ["logs", "metrics", "trace", "grpc-tonic", "gzip-tonic", "tls", "tls-roots", "hyper-client"], default-features = false }
86+
opentelemetry-proto = { version = "0.27", features = ["full"] }
87+
opentelemetry-semantic-conventions = { version = "0.27", features = ["semconv_experimental"] }
88+
opentelemetry_sdk = { version = "0.27", features = ["logs", "metrics", "trace", "rt-tokio", "rt-tokio-current-thread", "testing"], default-features = false }
8989
petname = { version = "2.0.2", default-features = false, features = ["default-rng", "default-words"] }
9090
r3bl_rs_utils_core = "0.9"
9191
r3bl_tui = "0.5"
@@ -112,15 +112,14 @@ tracing = { version = "0.1", default-features = false }
112112
tracing-appender = "0.2.2"
113113
tracing-core = { version = "0.1.32", default-features = false }
114114
tracing-error = "0.2.0"
115-
tracing-opentelemetry = "0.27.0"
115+
tracing-opentelemetry = "0.28"
116116
tracing-subscriber = { version = "0.3", features = ["json"] }
117117
url = "2.5.2"
118118

119119
ockam_multiaddr = { path = "../ockam_multiaddr", version = "0.69.0", features = ["cbor", "serde"] }
120120
ockam_transport_core = { path = "../ockam_transport_core", version = "^0.101.0" }
121121
ockam_transport_tcp = { path = "../ockam_transport_tcp", version = "^0.135.0", default-features = false, features = ["std"] }
122-
tonic = "0.12"
123-
futures-core = "0.3.31"
122+
tonic = { version = "0.12", features = ["default", "gzip"] }
124123

125124
[dependencies.ockam_core]
126125
version = "0.124.0"
@@ -166,7 +165,7 @@ multimap = "0.10.0"
166165
ockam_macros = { path = "../ockam_macros", features = ["std"], version = "^0.37.0" }
167166
ockam_transport_core = { path = "../ockam_transport_core", version = "^0.101.0" }
168167
ockam_transport_tcp = { path = "../ockam_transport_tcp", default-features = false, version = "^0.135.0" }
169-
opentelemetry_sdk = { version = "0.26.0", features = ["logs", "metrics", "trace", "rt-tokio", "testing"], default-features = false }
168+
opentelemetry_sdk = { version = "0.27", features = ["logs", "metrics", "trace", "rt-tokio", "testing"], default-features = false }
170169
quickcheck = "1.0.1"
171170
quickcheck_macros = "1.0.0"
172171
serial_test = "3.0.0"

0 commit comments

Comments
 (0)