Skip to content

Commit a5c27f6

Browse files
fix: Backport opentelemetry 0.18 code from main repo (#9)
## Motivation I noticed that this repo got the cut-off before opentelemetry 0.18 was committed into the main repo so I tried to backport what was there. ## Solution This is pretty much a backport from the code that @jtescher did on the main repo. Let me know if you see something wrong, I tried to adapt the rejections the best way possible. This fix #8 --------- Signed-off-by: Jayson Reis <[email protected]> Co-authored-by: Julian Tescher <[email protected]>
1 parent bd7d8f6 commit a5c27f6

File tree

9 files changed

+287
-262
lines changed

9 files changed

+287
-262
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ categories = [
1717
keywords = ["tracing", "opentelemetry", "jaeger", "zipkin", "async"]
1818
license = "MIT"
1919
edition = "2018"
20-
rust-version = "1.46.0"
20+
rust-version = "1.56.0"
2121

2222
[features]
2323
default = ["tracing-log", "metrics"]
2424
# Enables support for exporting OpenTelemetry metrics
2525
metrics = ["opentelemetry/metrics"]
2626

2727
[dependencies]
28-
opentelemetry = { version = "0.17.0", default-features = false, features = ["trace"] }
28+
opentelemetry = { version = "0.18.0", default-features = false, features = ["trace"] }
2929
tracing = { version = "0.1.35", default-features = false, features = ["std"] }
3030
tracing-core = "0.1.28"
3131
tracing-subscriber = { version = "0.3.0", default-features = false, features = ["registry", "std"] }
@@ -39,7 +39,7 @@ thiserror = { version = "1.0.31", optional = true }
3939
[dev-dependencies]
4040
async-trait = "0.1.56"
4141
criterion = { version = "0.3.6", default-features = false }
42-
opentelemetry-jaeger = "0.16.0"
42+
opentelemetry-jaeger = "0.17.0"
4343
tracing = { version = "0.1.35", default-features = false, features = ["std", "attributes"] }
4444
tracing-subscriber = { version = "0.3.0", default-features = false, features = ["registry", "std"] }
4545
futures-util = { version = "0.3", default-features = false }

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The crate provides the following types:
5050
[`tracing`]: https://crates.io/crates/tracing
5151
[OpenTelemetry]: https://opentelemetry.io/
5252

53-
*Compiler support: [requires `rustc` 1.49+][msrv]*
53+
*Compiler support: [requires `rustc` 1.56+][msrv]*
5454

5555
[msrv]: #supported-rust-versions
5656

@@ -110,7 +110,7 @@ $ firefox http://localhost:16686/
110110
## Supported Rust Versions
111111

112112
Tracing Opentelemetry is built against the latest stable release. The minimum
113-
supported version is 1.46. The current Tracing version is not guaranteed to
113+
supported version is 1.56. The current Tracing version is not guaranteed to
114114
build on Rust versions earlier than the minimum supported version.
115115

116116
Tracing follows the same compiler support policies as the rest of the Tokio

examples/opentelemetry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
1818
// Install an otel pipeline with a simple span processor that exports data one at a time when
1919
// spans end. See the `install_batch` option on each exporter's pipeline builder to see how to
2020
// export in batches.
21-
let tracer = opentelemetry_jaeger::new_pipeline()
21+
let tracer = opentelemetry_jaeger::new_agent_pipeline()
2222
.with_service_name("report_example")
2323
.install_simple()?;
2424
let opentelemetry = tracing_opentelemetry::layer().with_tracer(tracer);

0 commit comments

Comments
 (0)