mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 14:42:30 +00:00
update opentelemtry dependencies
This commit is contained in:
85
Cargo.lock
generated
85
Cargo.lock
generated
@@ -1,6 +1,6 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "actix-codec"
|
||||
@@ -1514,7 +1514,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b7cab7543a8b7729a19e2c04309f902861293dcdae6558dfbeb634454d279f6"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"thiserror",
|
||||
"thiserror 1.0.65",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -1882,23 +1882,23 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry"
|
||||
version = "0.26.0"
|
||||
version = "0.27.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "570074cc999d1a58184080966e5bd3bf3a9a4af650c3b05047c2621e7405cd17"
|
||||
checksum = "ab70038c28ed37b97d8ed414b6429d343a8bbf44c9f79ec854f3a643029ba6d7"
|
||||
dependencies = [
|
||||
"futures-core",
|
||||
"futures-sink",
|
||||
"js-sys",
|
||||
"once_cell",
|
||||
"pin-project-lite",
|
||||
"thiserror",
|
||||
"thiserror 1.0.65",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-otlp"
|
||||
version = "0.26.0"
|
||||
version = "0.27.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "29e1f9c8b032d4f635c730c0efcf731d5e2530ea13fa8bef7939ddc8420696bd"
|
||||
checksum = "91cf61a1868dacc576bf2b2a1c3e9ab150af7272909e80085c3173384fe11f76"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"futures-core",
|
||||
@@ -1907,16 +1907,17 @@ dependencies = [
|
||||
"opentelemetry-proto",
|
||||
"opentelemetry_sdk",
|
||||
"prost",
|
||||
"thiserror",
|
||||
"thiserror 1.0.65",
|
||||
"tokio",
|
||||
"tonic",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-proto"
|
||||
version = "0.26.1"
|
||||
version = "0.27.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c9d3968ce3aefdcca5c27e3c4ea4391b37547726a70893aab52d3de95d5f8b34"
|
||||
checksum = "a6e05acbfada5ec79023c85368af14abd0b307c015e9064d249b2a950ef459a6"
|
||||
dependencies = [
|
||||
"opentelemetry",
|
||||
"opentelemetry_sdk",
|
||||
@@ -1926,29 +1927,29 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-semantic-conventions"
|
||||
version = "0.26.0"
|
||||
version = "0.27.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db945c1eaea8ac6a9677185357480d215bb6999faa9f691d0c4d4d641eab7a09"
|
||||
checksum = "bc1b6902ff63b32ef6c489e8048c5e253e2e4a803ea3ea7e783914536eb15c52"
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry_sdk"
|
||||
version = "0.26.0"
|
||||
version = "0.27.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2c627d9f4c9cdc1f21a29ee4bfbd6028fcb8bcf2a857b43f3abdf72c9c862f3"
|
||||
checksum = "231e9d6ceef9b0b2546ddf52335785ce41252bc7474ee8ba05bfad277be13ab8"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"futures-channel",
|
||||
"futures-executor",
|
||||
"futures-util",
|
||||
"glob",
|
||||
"once_cell",
|
||||
"opentelemetry",
|
||||
"percent-encoding",
|
||||
"rand",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
"thiserror 1.0.65",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2512,7 +2513,7 @@ dependencies = [
|
||||
"serde",
|
||||
"sha2",
|
||||
"strum",
|
||||
"thiserror",
|
||||
"thiserror 2.0.8",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"tracing-actix-web",
|
||||
@@ -2536,7 +2537,7 @@ dependencies = [
|
||||
"rustical_store",
|
||||
"serde",
|
||||
"strum",
|
||||
"thiserror",
|
||||
"thiserror 2.0.8",
|
||||
"tokio",
|
||||
"tracing",
|
||||
"tracing-actix-web",
|
||||
@@ -2558,7 +2559,7 @@ dependencies = [
|
||||
"rustical_xml",
|
||||
"serde",
|
||||
"strum",
|
||||
"thiserror",
|
||||
"thiserror 2.0.8",
|
||||
"tracing",
|
||||
"tracing-actix-web",
|
||||
]
|
||||
@@ -2578,7 +2579,7 @@ dependencies = [
|
||||
"rust-embed",
|
||||
"rustical_store",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"thiserror 2.0.8",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
@@ -2603,7 +2604,7 @@ dependencies = [
|
||||
"rstest_reuse",
|
||||
"serde",
|
||||
"sha2",
|
||||
"thiserror",
|
||||
"thiserror 2.0.8",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
@@ -2615,7 +2616,7 @@ dependencies = [
|
||||
"rustical_store",
|
||||
"serde",
|
||||
"sqlx",
|
||||
"thiserror",
|
||||
"thiserror 2.0.8",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
@@ -2624,7 +2625,7 @@ name = "rustical_xml"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"quick-xml",
|
||||
"thiserror",
|
||||
"thiserror 2.0.8",
|
||||
"xml_derive",
|
||||
]
|
||||
|
||||
@@ -2905,7 +2906,7 @@ dependencies = [
|
||||
"sha2",
|
||||
"smallvec",
|
||||
"sqlformat",
|
||||
"thiserror",
|
||||
"thiserror 1.0.65",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"tracing",
|
||||
@@ -2990,7 +2991,7 @@ dependencies = [
|
||||
"smallvec",
|
||||
"sqlx-core",
|
||||
"stringprep",
|
||||
"thiserror",
|
||||
"thiserror 1.0.65",
|
||||
"tracing",
|
||||
"uuid",
|
||||
"whoami",
|
||||
@@ -3030,7 +3031,7 @@ dependencies = [
|
||||
"smallvec",
|
||||
"sqlx-core",
|
||||
"stringprep",
|
||||
"thiserror",
|
||||
"thiserror 1.0.65",
|
||||
"tracing",
|
||||
"uuid",
|
||||
"whoami",
|
||||
@@ -3108,9 +3109,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.85"
|
||||
version = "2.0.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56"
|
||||
checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -3148,7 +3149,16 @@ version = "1.0.65"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5"
|
||||
dependencies = [
|
||||
"thiserror-impl",
|
||||
"thiserror-impl 1.0.65",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror"
|
||||
version = "2.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08f5383f3e0071702bf93ab5ee99b52d26936be9dedd9413067cbdcddcb6141a"
|
||||
dependencies = [
|
||||
"thiserror-impl 2.0.8",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3162,6 +3172,17 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thiserror-impl"
|
||||
version = "2.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2f357fcec90b3caef6623a099691be676d033b40a058ac95d2a6ade6fa0c943"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thread_local"
|
||||
version = "1.1.8"
|
||||
@@ -3442,9 +3463,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tracing-opentelemetry"
|
||||
version = "0.27.0"
|
||||
version = "0.28.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc58af5d3f6c5811462cabb3289aec0093f7338e367e5a33d28c0433b3c7360b"
|
||||
checksum = "97a971f6058498b5c0f1affa23e7ea202057a7301dbff68e968b2d578bcbd053"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"once_cell",
|
||||
|
||||
12
Cargo.toml
12
Cargo.toml
@@ -47,7 +47,7 @@ tokio = { version = "1", features = [
|
||||
] }
|
||||
url = "2.5"
|
||||
base64 = "0.22"
|
||||
thiserror = "1.0"
|
||||
thiserror = "2.0"
|
||||
quick-xml = { version = "0.37", features = [
|
||||
"serde",
|
||||
"serde-types",
|
||||
@@ -114,12 +114,12 @@ sqlx = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
tracing-actix-web = { workspace = true }
|
||||
|
||||
opentelemetry = "0.26"
|
||||
opentelemetry-otlp = "0.26"
|
||||
opentelemetry_sdk = { version = "0.26", features = ["rt-tokio"] }
|
||||
opentelemetry = "0.27"
|
||||
opentelemetry-otlp = "0.27"
|
||||
opentelemetry_sdk = { version = "0.27", features = ["rt-tokio"] }
|
||||
|
||||
opentelemetry-semantic-conventions = "0.26"
|
||||
tracing-opentelemetry = "0.27"
|
||||
opentelemetry-semantic-conventions = "0.27"
|
||||
tracing-opentelemetry = "0.28"
|
||||
tracing-subscriber = { version = "0.3", features = [
|
||||
"env-filter",
|
||||
"fmt",
|
||||
|
||||
@@ -4,8 +4,8 @@ use opentelemetry::trace::TracerProvider;
|
||||
use opentelemetry::KeyValue;
|
||||
use opentelemetry_otlp::WithExportConfig;
|
||||
use opentelemetry_sdk::propagation::TraceContextPropagator;
|
||||
use opentelemetry_sdk::trace::{self, BatchConfig, Tracer};
|
||||
use opentelemetry_sdk::{runtime, Resource};
|
||||
use opentelemetry_sdk::trace::Tracer;
|
||||
use opentelemetry_sdk::Resource;
|
||||
use opentelemetry_semantic_conventions::resource::{SERVICE_NAME, SERVICE_VERSION};
|
||||
use opentelemetry_semantic_conventions::SCHEMA_URL;
|
||||
use std::time::Duration;
|
||||
@@ -16,25 +16,22 @@ use tracing_subscriber::util::SubscriberInitExt;
|
||||
use tracing_subscriber::EnvFilter;
|
||||
|
||||
pub fn init_tracer() -> Tracer {
|
||||
let otel_exporter = opentelemetry_otlp::new_exporter()
|
||||
.tonic()
|
||||
.with_timeout(Duration::from_secs(1));
|
||||
let otel_exporter = opentelemetry_otlp::SpanExporter::builder()
|
||||
.with_tonic()
|
||||
.with_timeout(Duration::from_secs(1))
|
||||
.build()
|
||||
.unwrap();
|
||||
|
||||
let tracer_provider = opentelemetry_otlp::new_pipeline()
|
||||
.tracing()
|
||||
.with_exporter(otel_exporter)
|
||||
.with_trace_config(
|
||||
trace::Config::default().with_resource(Resource::from_schema_url(
|
||||
[
|
||||
KeyValue::new(SERVICE_NAME, env!("CARGO_PKG_NAME")),
|
||||
KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION")),
|
||||
],
|
||||
SCHEMA_URL,
|
||||
)),
|
||||
)
|
||||
.with_batch_config(BatchConfig::default())
|
||||
.install_batch(runtime::Tokio)
|
||||
.expect("Failed to install tracer");
|
||||
let tracer_provider = opentelemetry_sdk::trace::TracerProvider::builder()
|
||||
.with_batch_exporter(otel_exporter, opentelemetry_sdk::runtime::Tokio)
|
||||
.with_resource(Resource::from_schema_url(
|
||||
[
|
||||
KeyValue::new(SERVICE_NAME, env!("CARGO_PKG_NAME")),
|
||||
KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION")),
|
||||
],
|
||||
SCHEMA_URL,
|
||||
))
|
||||
.build();
|
||||
|
||||
global::set_tracer_provider(tracer_provider.clone());
|
||||
tracer_provider.tracer("rustical")
|
||||
|
||||
Reference in New Issue
Block a user