Skip to content

Commit

Permalink
feat: update crates
Browse files Browse the repository at this point in the history
  • Loading branch information
ralvescosta committed Jul 20, 2024
1 parent 09b3806 commit 99c2638
Show file tree
Hide file tree
Showing 12 changed files with 194 additions and 150 deletions.
290 changes: 167 additions & 123 deletions Cargo.lock

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ members = [
]

[workspace.dependencies]
thiserror = { version = "1.0.61" }
serde = { version = "1.0.203" }
serde_json = { version = "1.0.117" }
tokio = { version = "1.38.0" }
async-trait = { version = "0.1.80" }
thiserror = { version = "1.0.63" }
serde = { version = "1.0.204" }
serde_json = { version = "1.0.120" }
tokio = { version = "1.38.1" }
async-trait = { version = "0.1.81" }
tracing = { version = "0.1.40" }
tonic = { version = "0.11" }
opentelemetry = { version = "0.23.0" }
opentelemetry_sdk = { version = "0.23.0" }
tonic = { version = "0.12" }
opentelemetry = { version = "0.24.0" }
opentelemetry_sdk = { version = "0.24.0" }
2 changes: 1 addition & 1 deletion health_readiness/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ thiserror = { workspace = true }
paho-mqtt = { version = "0.12.5", optional = true }

# rabbitmq
lapin = { version = "2.3.4", optional = true }
lapin = { version = "2.4.0", optional = true }

# postgres
deadpool-postgres = { version = "0.14.0", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion http_components/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ auth = { path = "../auth", optional = true }
otel = { path = "../otel", optional = true }

# metrics
opentelemetry-semantic-conventions = { version = "0.15", optional = true }
opentelemetry-semantic-conventions = { version = "0.16", optional = true }
opentelemetry-prometheus = { version = "0.16", optional = true }
prometheus = { version = "0.13.4", optional = true }

Expand Down
4 changes: 2 additions & 2 deletions http_components/src/middlewares/otel/http_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use super::attributes::metrics_attributes_from_request;
use actix_web::dev;
use futures_util::future::{self, FutureExt as _, LocalBoxFuture};
use opentelemetry::metrics::{Counter, Histogram, Meter, Unit, UpDownCounter};
use opentelemetry::metrics::{Counter, Histogram, Meter, UpDownCounter};
use opentelemetry::{global, Key, KeyValue, Value};
use std::{sync::Arc, time::SystemTime};

Expand Down Expand Up @@ -31,7 +31,7 @@ impl Metrics {
let http_server_duration = meter
.f64_histogram(HTTP_SERVER_DURATION)
.with_description("HTTP inbound request duration per route")
.with_unit(Unit::new("ms"))
.with_unit("ms")
.init();

let http_requests = meter
Expand Down
4 changes: 2 additions & 2 deletions metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ thiserror = { workspace = true }
# OTLP Featue
tonic = { workspace = true, features = ["tls"], optional = true }
tokio = { workspace = true, features = ["default"], optional = true }
opentelemetry-otlp = { version = "0.16", features = ["metrics", "prost", "grpc-tonic", "gzip-tonic","tls", "tls-roots"], optional = true }
opentelemetry-otlp = { version = "0.17", features = ["metrics", "prost", "grpc-tonic", "gzip-tonic","tls", "tls-roots"], optional = true }

# Prometheus Feature
prometheus = { version = "0.13.4" }
opentelemetry-prometheus = { version = "0.16", optional = true }

# Stdout
opentelemetry-stdout = { version = "0.4", features = ["metrics"], optional = true }
opentelemetry-stdout = { version = "0.5", features = ["metrics"], optional = true }
6 changes: 3 additions & 3 deletions mqtt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ messaging = { path = "../messaging" }
opentelemetry = { workspace = true }
tracing = { workspace = true }
async-trait = { workspace = true }
bytes = { version = "1.6.0", features = ["serde"] }
bytes = { version = "1.6.1", features = ["serde"] }
paho-mqtt = { version = "0.12.5" }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
futures-util = { version = "0.3.30" }
thiserror = { workspace = true }

# Used only with feature mock
mockall = { version = "0.12.1", optional = true }
mockall = { version = "0.12", optional = true }

[dev-dependencies]
messaging = { path = "../messaging", features = ["mocks"] }

mockall = { version = "0.12.1" }
mockall = { version = "0.12" }
tokio = { workspace = true }
6 changes: 3 additions & 3 deletions rabbitmq/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ configs = { path = "../configs" }
messaging = { path = "../messaging" }
traces = { path = "../traces" }

lapin = { version = "2.3.4" }
lapin = { version = "2.4.0" }
opentelemetry = { workspace = true }
uuid = { version = "1.8.0", features = ["v4"] }
uuid = { version = "1.10.0", features = ["v4"] }
async-trait = { workspace = true }
tracing = { workspace = true }
serde_json = { workspace = true }
Expand All @@ -20,4 +20,4 @@ futures-util = { version = "0.3.30"}
thiserror = { workspace = true }

[dev-dependencies]
mockall = { version = "0.12.1" }
mockall = { version = "0.12" }
2 changes: 1 addition & 1 deletion rabbitmq/src/publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl Publisher for RabbitMQPublisher {
&infos.data,
BasicProperties::default()
.with_content_type(ShortString::from(JSON_CONTENT_TYPE))
.with_kind(ShortString::from(infos.msg_type.clone()))
.with_type(ShortString::from(infos.msg_type.clone()))
.with_message_id(ShortString::from(Uuid::new_v4().to_string()))
.with_headers(FieldTable::from(btree)),
)
Expand Down
4 changes: 2 additions & 2 deletions secrets_manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ mocks = ["dep:mockall"]
[dependencies]
async-trait = { workspace = true }
tracing = { workspace = true }
aws-config = { version = "1.5.3" }
aws-sdk-secretsmanager = { version = "1.37.0" }
aws-config = { version = "1.5.4" }
aws-sdk-secretsmanager = { version = "1.39.0" }
serde_json = { workspace = true }
thiserror = { workspace = true }

Expand Down
4 changes: 2 additions & 2 deletions traces/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ serde = { workspace = true, features = ["derive"] }
tonic = { workspace = true, features = ["tls"] }
tokio = { workspace = true, features = ["default"] }

opentelemetry-otlp = { version = "0.16", features = ["tonic", "tls", "tls-roots"], optional = true }
opentelemetry-otlp = { version = "0.17", features = ["tonic", "tls", "tls-roots"], optional = true }

opentelemetry-stdout = { version = "0.4", features = ["trace"], optional = true }
opentelemetry-stdout = { version = "0.5", features = ["trace"], optional = true }
4 changes: 2 additions & 2 deletions traces/src/provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::{errors::TracesError, get_sampler};
use configs::{Configs, DynamicConfigs, TraceExporterKind};
use opentelemetry::KeyValue;
use opentelemetry_sdk::{
trace::{self, RandomIdGenerator},
trace::{Config, RandomIdGenerator},
Resource,
};
use std::vec;
Expand All @@ -22,7 +22,7 @@ where

debug!("traces::init creating the tracer...");

let _trace_configs = trace::config()
let _trace_configs = Config::default()
.with_sampler(get_sampler(cfg))
.with_id_generator(RandomIdGenerator::default())
.with_max_events_per_span(64)
Expand Down

0 comments on commit 99c2638

Please sign in to comment.