Skip to content

Commit

Permalink
build(deps): bump opentelemetry-otlp from 0.15.0 to 0.16.0 (#415)
Browse files Browse the repository at this point in the history
* build(deps): bump opentelemetry-otlp from 0.15.0 to 0.16.0

Bumps [opentelemetry-otlp](https://github.com/open-telemetry/opentelemetry-rust) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-rust/releases)
- [Commits](open-telemetry/opentelemetry-rust@opentelemetry-otlp-0.15.0...opentelemetry-otlp-0.16.0)

---
updated-dependencies:
- dependency-name: opentelemetry-otlp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* wip

* wip

* update

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dev0 <[email protected]>
  • Loading branch information
dependabot[bot] and ibigbug authored May 30, 2024
1 parent b747f7d commit 6ff0a72
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 85 deletions.
95 changes: 23 additions & 72 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions clash_lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ ip_network_table-deps-treebitmap = "0.5.0"
once_cell = "1.18.0"

# opentelemetry
opentelemetry = "0.22"
opentelemetry_sdk = { version = "0.22", features = ["rt-tokio"] }
tracing-opentelemetry = "0.23"
opentelemetry-jaeger-propagator = "0.1.0"
opentelemetry = "0.23"
opentelemetry_sdk = { version = "0.23", features = ["rt-tokio"] }
tracing-opentelemetry = "0.24"
opentelemetry-jaeger-propagator = "0.2.0"
opentelemetry-jaeger = { version = "0.22", features = ["collector_client", "hyper_collector_client", "rt-tokio"] }
opentelemetry-otlp = { version = "0.15.0", features = ["grpc-tonic"] }
opentelemetry-otlp = { version = "0.16.0", features = ["grpc-tonic"] }

crc32fast = "1.4.2"
brotli = "6.0.0"
Expand Down
21 changes: 13 additions & 8 deletions clash_lib/src/app/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use opentelemetry::global;
use opentelemetry::KeyValue;
use opentelemetry_otlp::WithExportConfig;
use opentelemetry_sdk::trace;
use opentelemetry_sdk::trace::Sampler;
use opentelemetry_sdk::Resource;
use serde::Serialize;
use tokio::sync::broadcast::Sender;
Expand Down Expand Up @@ -108,14 +109,18 @@ pub fn setup_logging(
let otlp_exporter = opentelemetry_otlp::new_exporter()
.tonic()
.with_endpoint(jager_endpoint);
let tracer =
opentelemetry_otlp::new_pipeline()
.tracing()
.with_exporter(otlp_exporter)
.with_trace_config(trace::config().with_resource(Resource::new(vec![
KeyValue::new("service.name", "clash-rs"),
])))
.install_batch(opentelemetry_sdk::runtime::Tokio)?;
let tracer = opentelemetry_otlp::new_pipeline()
.tracing()
.with_exporter(otlp_exporter)
.with_trace_config(
trace::config()
.with_sampler(Sampler::AlwaysOn)
.with_resource(Resource::new(vec![KeyValue::new(
"service.name",
"clash-rs",
)])),
)
.install_batch(opentelemetry_sdk::runtime::Tokio)?;

Some(tracing_opentelemetry::layer().with_tracer(tracer))
} else {
Expand Down

0 comments on commit 6ff0a72

Please sign in to comment.