Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1996 from grapl-security/inickles/remove-actix-we…
Browse files Browse the repository at this point in the history
…b-opentelem

Inickles/remove actix web opentelem
  • Loading branch information
wimax-grapl committed Sep 20, 2022
2 parents 59c4f7d + 05ff918 commit 862ae53
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 55 deletions.
38 changes: 0 additions & 38 deletions src/rust/Cargo.lock

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

5 changes: 1 addition & 4 deletions src/rust/grapl-web-ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ actix-web = { version = "4.1", default_features = false, features = [
"compress-brotli"
] }
actix-multipart = "0.4"
actix-web-opentelemetry = { version = "0.12", features = ["awc"] }
argon2 = { version = "0.4", features = ["std"] }
awc = { version = "3", default_features = false, features = [
"compress-brotli"
Expand All @@ -38,7 +37,6 @@ grapl-tracing = { path = "../grapl-tracing" }
grapl-utils = { path = "../grapl-utils" }
hmap = "0.1"
jsonwebtoken-google = "0.1"
opentelemetry = { version = "0.17", features = ["rt-tokio"] }
rand = "0.8"
rusoto_core = { version = "0.47", default_features = false, features = [
"rustls"
Expand All @@ -53,11 +51,10 @@ serde_dynamodb = "0.9"
thiserror = "1.0"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
tracing = "0.1"
tracing-opentelemetry = "0.17"
tracing-subscriber = "0.3"
url = "2.2"
serde_json = "1"
uuid = { version = "1.0", features = ["v4"] }
uuid = { version = "1.0", features = ["v4", "serde"] }

[dev-dependencies]
eyre = "0.6"
Expand Down
1 change: 0 additions & 1 deletion src/rust/grapl-web-ui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pub fn run(config: config::Config) -> Result<Server, std::io::Error> {

App::new()
.wrap(actix_web::middleware::Logger::default())
.wrap(actix_web_opentelemetry::RequestTracing::new())
.wrap(actix_web::middleware::Compress::default())
.wrap(
CookieSession::private(&config.session_key)
Expand Down
3 changes: 0 additions & 3 deletions src/rust/grapl-web-ui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {

grapl_web_ui::run(config)?.await?;

// send remaining trace spans.
opentelemetry::global::shutdown_tracer_provider();

Ok(())
}
13 changes: 4 additions & 9 deletions src/rust/grapl-web-ui/src/routes/api/graphql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use actix_web::{
HttpResponse,
Result,
};
use actix_web_opentelemetry::ClientExt;

use crate::upstream::GraphQlEndpointUrl;

Expand Down Expand Up @@ -52,15 +51,11 @@ pub(self) async fn fwd_request_to_backend_service(
.request_from(backend_url.as_str(), req.head())
.no_decompress();

let mut res = forwarded_req
.trace_request()
.send_stream(payload)
.await
.map_err(|error| {
tracing::error!(%error);
let mut res = forwarded_req.send_stream(payload).await.map_err(|error| {
tracing::error!(%error);

actix_web::error::ErrorInternalServerError(error)
})?;
actix_web::error::ErrorInternalServerError(error)
})?;

tracing::debug!(
message = "Received response from backend service",
Expand Down

0 comments on commit 862ae53

Please sign in to comment.