2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-11-20 11:21:14 +00:00

Update opentelemetry dependencies

This commit is contained in:
asonix 2023-11-10 15:19:54 -06:00
parent 5e219f7cc0
commit 3a0546694f
3 changed files with 82 additions and 57 deletions

116
Cargo.lock generated
View file

@ -1023,6 +1023,12 @@ version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0"
[[package]]
name = "glob"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "h2"
version = "0.3.21"
@ -1105,9 +1111,9 @@ dependencies = [
[[package]]
name = "http"
version = "0.2.9"
version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
checksum = "f95b9abcae896730d42b78e09c155ed4ddf82c07b4de772c64aee5b2d8b7c150"
dependencies = [
"bytes",
"fnv",
@ -1490,6 +1496,12 @@ dependencies = [
"windows-sys",
]
[[package]]
name = "mutually_exclusive_features"
version = "0.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d02c0b00610773bb7fc61d85e13d86c7858cbdf00e1a120bfc41bc055dbaa0e"
[[package]]
name = "nanorand"
version = "0.7.0"
@ -1555,26 +1567,32 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]]
name = "opentelemetry"
version = "0.20.0"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9591d937bc0e6d2feb6f71a559540ab300ea49955229c347a517a28d27784c54"
checksum = "1e32339a5dc40459130b3bd269e9892439f55b33e772d2a9d402a789baaf4e8a"
dependencies = [
"opentelemetry_api",
"opentelemetry_sdk",
"futures-core",
"futures-sink",
"indexmap 2.1.0",
"js-sys",
"once_cell",
"pin-project-lite",
"thiserror",
"urlencoding",
]
[[package]]
name = "opentelemetry-otlp"
version = "0.13.0"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7e5e5a5c4135864099f3faafbe939eb4d7f9b80ebf68a8448da961b32a7c1275"
checksum = "f24cda83b20ed2433c68241f918d0f6fdec8b1d43b7a9590ab4420c5095ca930"
dependencies = [
"async-trait",
"futures-core",
"http",
"opentelemetry",
"opentelemetry-proto",
"opentelemetry-semantic-conventions",
"opentelemetry_api",
"opentelemetry_sdk",
"prost 0.11.9",
"thiserror",
@ -1584,11 +1602,11 @@ dependencies = [
[[package]]
name = "opentelemetry-proto"
version = "0.3.0"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1e3f814aa9f8c905d0ee4bde026afd3b2577a97c10e1699912e3e44f0c4cbeb"
checksum = "a2e155ce5cc812ea3d1dffbd1539aed653de4bf4882d60e6e04dcf0901d674e1"
dependencies = [
"opentelemetry_api",
"opentelemetry",
"opentelemetry_sdk",
"prost 0.11.9",
"tonic 0.9.2",
@ -1596,47 +1614,30 @@ dependencies = [
[[package]]
name = "opentelemetry-semantic-conventions"
version = "0.12.0"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73c9f9340ad135068800e7f1b24e9e09ed9e7143f5bf8518ded3d3ec69789269"
checksum = "f5774f1ef1f982ef2a447f6ee04ec383981a3ab99c8e77a1a7b30182e65bbc84"
dependencies = [
"opentelemetry",
]
[[package]]
name = "opentelemetry_api"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a81f725323db1b1206ca3da8bb19874bbd3f57c3bcd59471bfb04525b265b9b"
dependencies = [
"futures-channel",
"futures-util",
"indexmap 1.9.3",
"js-sys",
"once_cell",
"pin-project-lite",
"thiserror",
"urlencoding",
]
[[package]]
name = "opentelemetry_sdk"
version = "0.20.0"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fa8e705a0612d48139799fcbaba0d4a90f06277153e43dd2bdc16c6f0edd8026"
checksum = "a5b3ce3f5705e2ae493be467a0b23be4bc563c193cdb7713e55372c89a906b34"
dependencies = [
"async-trait",
"crossbeam-channel",
"futures-channel",
"futures-executor",
"futures-util",
"glob",
"once_cell",
"opentelemetry_api",
"opentelemetry",
"ordered-float",
"percent-encoding",
"rand",
"regex",
"serde_json",
"thiserror",
"tokio",
"tokio-stream",
@ -1644,9 +1645,9 @@ dependencies = [
[[package]]
name = "ordered-float"
version = "3.9.2"
version = "4.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1e1c390732d15f1d48471625cd92d154e66db2c56645e29a9cd26f4699f72dc"
checksum = "536900a8093134cf9ccf00a27deb3532421099e958d9dd431135d0c7543ca1e8"
dependencies = [
"num-traits",
]
@ -1775,6 +1776,7 @@ dependencies = [
"mime",
"opentelemetry",
"opentelemetry-otlp",
"opentelemetry_sdk",
"pin-project-lite",
"refinery",
"reqwest",
@ -1800,7 +1802,7 @@ dependencies = [
"tracing",
"tracing-actix-web",
"tracing-error",
"tracing-log",
"tracing-log 0.2.0",
"tracing-opentelemetry",
"tracing-subscriber",
"url",
@ -3034,11 +3036,12 @@ dependencies = [
[[package]]
name = "tracing-actix-web"
version = "0.7.8"
version = "0.7.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a512ec11fae6c666707625e84f83e5d58f941e9ab15723289c0d380edfe48f09"
checksum = "1fe0d5feac3f4ca21ba33496bcb1ccab58cca6412b1405ae80f0581541e0ca78"
dependencies = [
"actix-web",
"mutually_exclusive_features",
"opentelemetry",
"pin-project",
"tracing",
@ -3089,19 +3092,32 @@ dependencies = [
]
[[package]]
name = "tracing-opentelemetry"
version = "0.21.0"
name = "tracing-log"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75327c6b667828ddc28f5e3f169036cb793c3f588d83bf0f262a7f062ffed3c8"
checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
dependencies = [
"log",
"once_cell",
"tracing-core",
]
[[package]]
name = "tracing-opentelemetry"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c67ac25c5407e7b961fafc6f7e9aa5958fd297aada2d20fa2ae1737357e55596"
dependencies = [
"js-sys",
"once_cell",
"opentelemetry",
"opentelemetry_sdk",
"smallvec",
"tracing",
"tracing-core",
"tracing-log",
"tracing-log 0.2.0",
"tracing-subscriber",
"web-time",
]
[[package]]
@ -3131,7 +3147,7 @@ dependencies = [
"thread_local",
"tracing",
"tracing-core",
"tracing-log",
"tracing-log 0.1.4",
"tracing-serde",
]
@ -3344,6 +3360,16 @@ dependencies = [
"wasm-bindgen",
]
[[package]]
name = "web-time"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57099a701fb3a8043f993e8228dc24229c7b942e2b009a1b962e54489ba1d3bf"
dependencies = [
"js-sys",
"wasm-bindgen",
]
[[package]]
name = "webpki-roots"
version = "0.25.2"

View file

@ -36,8 +36,9 @@ md-5 = "0.10.5"
metrics = "0.21.1"
metrics-exporter-prometheus = { version = "0.12.1", default-features = false, features = ["http-listener"] }
mime = "0.3.1"
opentelemetry = { version = "0.20", features = ["rt-tokio"] }
opentelemetry-otlp = "0.13"
opentelemetry_sdk = { version = "0.21", features = ["rt-tokio"] }
opentelemetry = { version = "0.21" }
opentelemetry-otlp = "0.14"
pin-project-lite = "0.2.7"
refinery = { version = "0.8.10", features = ["tokio-postgres", "postgres"] }
reqwest = { version = "0.11.18", default-features = false, features = ["json", "rustls-tls", "stream"] }
@ -65,8 +66,8 @@ tokio-util = { version = "0.7", default-features = false, features = [
toml = "0.8.0"
tracing = "0.1.15"
tracing-error = "0.2.0"
tracing-log = "0.1.2"
tracing-opentelemetry = "0.21"
tracing-log = "0.2.0"
tracing-opentelemetry = "0.22"
tracing-subscriber = { version = "0.3.0", features = [
"ansi",
"env-filter",
@ -79,6 +80,6 @@ url = { version = "2.2", features = ["serde"] }
uuid = { version = "1", features = ["serde", "std", "v4", "v7"] }
[dependencies.tracing-actix-web]
version = "0.7.7"
version = "0.7.8"
default-features = false
features = ["emit_event_on_error", "opentelemetry_0_20"]
features = ["emit_event_on_error", "opentelemetry_0_21"]

View file

@ -1,10 +1,8 @@
use crate::config::{LogFormat, OpenTelemetry, Tracing};
use console_subscriber::ConsoleLayer;
use opentelemetry::{
sdk::{propagation::TraceContextPropagator, Resource},
KeyValue,
};
use opentelemetry::KeyValue;
use opentelemetry_otlp::WithExportConfig;
use opentelemetry_sdk::{propagation::TraceContextPropagator, Resource};
use tracing::subscriber::set_global_default;
use tracing_error::ErrorLayer;
use tracing_log::LogTracer;
@ -62,7 +60,7 @@ where
let tracer = opentelemetry_otlp::new_pipeline()
.tracing()
.with_trace_config(
opentelemetry::sdk::trace::config().with_resource(Resource::new(vec![
opentelemetry_sdk::trace::config().with_resource(Resource::new(vec![
KeyValue::new("service.name", otel.service_name.clone()),
])),
)
@ -71,7 +69,7 @@ where
.tonic()
.with_endpoint(url.as_str()),
)
.install_batch(opentelemetry::runtime::Tokio)?;
.install_batch(opentelemetry_sdk::runtime::Tokio)?;
let otel_layer = tracing_opentelemetry::layer()
.with_tracer(tracer)