Skip to content

Commit

Permalink
chore(deps): dependencies bump
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswk committed Oct 25, 2023
1 parent e77ea18 commit 0c6b33a
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 121 deletions.
93 changes: 55 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ anyhow = "1.0.75"
async-trait = "0.1.74"
chrono = {version = "0.4.31", features = ["serde"]}
cidr = "0.2.2"
clap = {version = "4.4.6", features = ["derive", "env"]}
clap = {version = "4.4.7", features = ["derive", "env"]}
clap-markdown = "0.1.3"
dashmap = "5.5.3"
dotenv = {version = "0.15.0", features = ["clap"]}
futures = "0.3.28"
futures-core = "0.3.28"
iter_tools = "0.1.4"
iter_tools = "0.2.0"
itertools = "0.11.0"
lazy_static = "1.4.0"
num_cpus = "1.16.0"
Expand All @@ -43,14 +43,14 @@ prometheus = {version = "0.13.3", features = ["process"]}
prometheus-static-metric = "0.5.1"
redis = {version = "0.23.3", features = ["tokio-comp", "tokio-rustls-comp"]}
reqwest = {version = "0.11.22", default-features = false, features = ["rustls", "json", "rustls-tls", "native-tls"]}
rustls = "0.21.7"
rustls = "0.21.8"
rustls-pemfile = "1.0.3"
serde = {version = "1.0.189", features = ["derive"]}
serde_json = "1.0.107"
serde_qs = { version = "0.12.0", features = ["actix4", "tracing"] }
shadow-rs = "0.24.0"
shadow-rs = "0.24.1"
tokio = {version = "1.33.0", features = ["macros", "rt-multi-thread", "tracing", "fs"]}
tracing = {version = "0.1.39", features = ["log"]}
tracing = {version = "0.1.40", features = ["log"]}
tracing-subscriber = {version = "0.3.17", features = ["json", "env-filter"]}
ulid = "1.1.0"
unleash-types = { version = "0.10", features = ["openapi", "hashes"]}
Expand All @@ -66,8 +66,8 @@ maplit = "1.0.2"
rand = "0.8.5"
test-case = "3.2.1"
testcontainers = "0.15.0"
testcontainers-modules = { version = "0.1.2", features = ["redis"]}
testcontainers-modules = { version = "0.1.3", features = ["redis"]}
tracing-test = "0.2.4"

[build-dependencies]
shadow-rs = "0.24.0"
shadow-rs = "0.24.1"
48 changes: 1 addition & 47 deletions server/src/metrics/actix_web_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,53 +250,7 @@ fn get_versioned_meter(meter_provider: impl MeterProvider) -> Meter {
None,
)
}
/// Request metrics tracking
///
/// # Examples
///
/// ```no_run
/// use actix_web::{dev, http, web, App, HttpRequest, HttpServer};
/// use unleash_edge::metrics::actix_web_metrics::{PrometheusMetricsHandler,
/// RequestMetricsBuilder};
/// use unleash_edge::middleware::request_tracing::RequestTracing;
/// use opentelemetry::{
/// global,
/// sdk::{
/// export::metrics::aggregation,
/// metrics::{controllers, processors, selectors},
/// propagation::TraceContextPropagator,
/// },
/// };
///
/// #[actix_web::main]
/// async fn main() -> std::io::Result<()> {
/// // Request metrics middleware
/// let meter = global::meter("actix_web");
/// let request_metrics = RequestMetricsBuilder::new().build(meter);
///
/// // Prometheus request metrics handler
/// let controller = controllers::basic(
/// processors::factory(
/// selectors::simple::histogram([1.0, 2.0, 5.0, 10.0, 20.0, 50.0]),
/// aggregation::cumulative_temporality_selector(),
/// )
/// )
/// .build();
/// let exporter = opentelemetry_prometheus::exporter(controller).init();
/// let metrics_handler = PrometheusMetricsHandler::new(exporter);
///
/// // Run actix server, metrics are now available at http://localhost:8080/metrics
/// HttpServer::new(move || {
/// App::new()
/// .wrap(RequestTracing::new())
/// .wrap(request_metrics.clone())
/// .route("/metrics", web::get().to(metrics_handler.clone()))
/// })
/// .bind("localhost:8080")?
/// .run()
/// .await
/// }
/// ```

#[derive(Clone, Debug)]
pub struct RequestMetrics {
route_formatter: Option<Arc<dyn RouteFormatter + Send + Sync + 'static>>,
Expand Down
29 changes: 0 additions & 29 deletions server/src/middleware/request_tracing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,6 @@ use std::borrow::Cow;
use std::rc::Rc;
use std::task::Poll;

/// Request tracing middleware.
///
/// # Examples:
///
/// ```no_run
/// use actix_web::{web, App, HttpServer};
/// async fn index() -> &'static str {
/// "Hello world!"
/// }
///
/// #[actix_web::main]
/// async fn main() -> std::io::Result<()> {
/// // Install an OpenTelemetry trace pipeline.
/// // Swap for https://docs.rs/opentelemetry-jaeger or other compatible
/// // exporter to send trace information to your collector.
///
/// use unleash_edge::middleware::request_tracing::RequestTracing;
/// opentelemetry::sdk::export::trace::stdout::new_pipeline().install_simple();
///
/// HttpServer::new(|| {
/// App::new()
/// .wrap(RequestTracing::new())
/// .service(web::resource("/").to(index))
/// })
/// .bind("127.0.0.1:8080")?
/// .run()
/// .await
/// }
///```
#[derive(Default, Debug)]
pub struct RequestTracing {
route_formatter: Option<Rc<dyn RouteFormatter + 'static>>,
Expand Down

0 comments on commit 0c6b33a

Please sign in to comment.