x
This commit is contained in:
16
rust/Cargo.lock
generated
16
rust/Cargo.lock
generated
@@ -1321,7 +1321,7 @@ dependencies = [
|
|||||||
"tower",
|
"tower",
|
||||||
"tower-http",
|
"tower-http",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-attributes 0.2.0",
|
"tracing-attributes",
|
||||||
"tracing-log",
|
"tracing-log",
|
||||||
"tracing-opentelemetry",
|
"tracing-opentelemetry",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
@@ -2395,25 +2395,13 @@ dependencies = [
|
|||||||
"cfg-if",
|
"cfg-if",
|
||||||
"log",
|
"log",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"tracing-attributes 0.1.26",
|
"tracing-attributes",
|
||||||
"tracing-core",
|
"tracing-core",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing-attributes"
|
name = "tracing-attributes"
|
||||||
version = "0.1.26"
|
version = "0.1.26"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn 2.0.29",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tracing-attributes"
|
|
||||||
version = "0.2.0"
|
|
||||||
source = "git+https://github.com/miwig/tracing?branch=master#29146260fb4615d271d2e899ad95a753bb42915e"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|||||||
@@ -60,10 +60,10 @@ features = ["trace", "request-id"]
|
|||||||
version = "0.1"
|
version = "0.1"
|
||||||
|
|
||||||
[dependencies.tracing-attributes]
|
[dependencies.tracing-attributes]
|
||||||
version = "=0.2.0"
|
version = "0.1"
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
tracing-attributes = { git = "https://github.com/miwig/tracing", branch = "master" }
|
tracing-attributes = { path = "./tracing/tracing-attributes" }
|
||||||
|
|
||||||
[dependencies.tracing-subscriber]
|
[dependencies.tracing-subscriber]
|
||||||
version = "0.3"
|
version = "0.3"
|
||||||
|
|||||||
19
rust/patch_issue_2599.patch
Normal file
19
rust/patch_issue_2599.patch
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
commit 08aa250dc73d6e36ebd7db9ebedb09ea36b377a0
|
||||||
|
Author: Michael Wigard <michael.wigard@uni-muenster.de>
|
||||||
|
Date: Wed May 24 13:10:31 2023 +0200
|
||||||
|
|
||||||
|
attributes: fix instrument with "log" feature
|
||||||
|
|
||||||
|
diff --git a/tracing-attributes/src/expand.rs b/tracing-attributes/src/expand.rs
|
||||||
|
index d71366c6..59a2eed4 100644
|
||||||
|
--- a/tracing-attributes/src/expand.rs
|
||||||
|
+++ b/tracing-attributes/src/expand.rs
|
||||||
|
@@ -340,7 +340,7 @@ fn gen_block<B: ToTokens>(
|
||||||
|
// regression in case the level is enabled.
|
||||||
|
let __tracing_attr_span;
|
||||||
|
let __tracing_attr_guard;
|
||||||
|
- if tracing::level_enabled!(#level) {
|
||||||
|
+ if tracing::level_enabled!(#level) || tracing::if_log_enabled!(#level, {true} else {false}) {
|
||||||
|
__tracing_attr_span = #span;
|
||||||
|
#follows_from
|
||||||
|
__tracing_attr_guard = __tracing_attr_span.enter();
|
||||||
@@ -36,7 +36,7 @@ fn get_referer(headers: &HeaderMap) -> Result<&str, Error> {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
//#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
async fn simple_handler(State(state): State<AppState>) -> &'static str {
|
async fn simple_handler(State(state): State<AppState>) -> &'static str {
|
||||||
use tracing::Instrument;
|
use tracing::Instrument;
|
||||||
let pool = async {
|
let pool = async {
|
||||||
@@ -55,7 +55,7 @@ async fn simple_handler(State(state): State<AppState>) -> &'static str {
|
|||||||
.await
|
.await
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
.instrument(tracing::warn_span!("init_pool"))
|
// .instrument(tracing::warn_span!("init_pool"))
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
tracing::warn!("test event");
|
tracing::warn!("test event");
|
||||||
@@ -66,7 +66,7 @@ async fn simple_handler(State(state): State<AppState>) -> &'static str {
|
|||||||
.await
|
.await
|
||||||
.unwrap()
|
.unwrap()
|
||||||
}
|
}
|
||||||
.instrument(tracing::warn_span!("test_span"))
|
// .instrument(tracing::warn_span!("test_span"))
|
||||||
.await;
|
.await;
|
||||||
"ok"
|
"ok"
|
||||||
}
|
}
|
||||||
|
|||||||
1
rust/tracing
Submodule
1
rust/tracing
Submodule
Submodule rust/tracing added at 430206459b
Reference in New Issue
Block a user