Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/cargo/thiserror-1.0.58
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Mar 21, 2024
2 parents 9022133 + a579e69 commit 55474bb
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 101 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ jobs:
- uses: actions/checkout@v4
- run: wget -q -O- https://github.com/obi1kenobi/cargo-semver-checks/releases/download/v0.27.0/cargo-semver-checks-x86_64-unknown-linux-gnu.tar.gz | tar -xz -C ~/.cargo/bin
shell: bash
- uses: obi1kenobi/cargo-semver-checks-action@48f4ef7da6d907d69d18249e0ba79aa98c61b9db # v2
- uses: obi1kenobi/cargo-semver-checks-action@c7306483f698c511eaf7416d1bf2e1958c90140f # v2

rustfmt:
runs-on: ubuntu-latest
Expand Down
145 changes: 60 additions & 85 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions examples/metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ release = false
futures = "0.3.30"
hyper = { version = "0.14", features = ["server", "tcp", "http1"] }
libp2p = { path = "../../libp2p", features = ["tokio", "metrics", "ping", "noise", "identify", "tcp", "yamux", "macros"] }
opentelemetry = { version = "0.20.0", features = ["rt-tokio", "metrics"] }
opentelemetry-otlp = { version = "0.13.0", features = ["metrics"]}
opentelemetry_api = "0.20.0"
opentelemetry = { version = "0.21.0", features = ["metrics"] }
opentelemetry-otlp = { version = "0.14.0", features = ["metrics"] }
opentelemetry_sdk = { version = "0.21.2", features = ["rt-tokio", "metrics"] }
prometheus-client = { workspace = true }
tokio = { version = "1", features = ["full"] }
tracing = "0.1.37"
tracing-opentelemetry = "0.21.0"
tracing-opentelemetry = "0.22.0"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

[lints]
Expand Down
14 changes: 5 additions & 9 deletions examples/metrics/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ use libp2p::core::Multiaddr;
use libp2p::metrics::{Metrics, Recorder};
use libp2p::swarm::{NetworkBehaviour, SwarmEvent};
use libp2p::{identify, identity, noise, ping, tcp, yamux};
use opentelemetry::sdk;
use opentelemetry_api::KeyValue;
use opentelemetry::KeyValue;
use prometheus_client::registry::Registry;
use std::error::Error;
use std::time::Duration;
Expand Down Expand Up @@ -87,13 +86,10 @@ fn setup_tracing() -> Result<(), Box<dyn Error>> {
let tracer = opentelemetry_otlp::new_pipeline()
.tracing()
.with_exporter(opentelemetry_otlp::new_exporter().tonic())
.with_trace_config(
sdk::trace::Config::default().with_resource(sdk::Resource::new(vec![KeyValue::new(
"service.name",
"libp2p",
)])),
)
.install_batch(opentelemetry::runtime::Tokio)?;
.with_trace_config(opentelemetry_sdk::trace::Config::default().with_resource(
opentelemetry_sdk::Resource::new(vec![KeyValue::new("service.name", "libp2p")]),
))
.install_batch(opentelemetry_sdk::runtime::Tokio)?;

tracing_subscriber::registry()
.with(tracing_subscriber::fmt::layer().with_filter(EnvFilter::from_default_env()))
Expand Down
Loading

0 comments on commit 55474bb

Please sign in to comment.