Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added notes to README to clarify version compatibility #171

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ The crate provides the following types:

[msrv]: #supported-rust-versions

## Compatibility with OpenTelemetry crates

Note that version numbers for this crate are **not** synchronized with the
various OpenTelemetry crates, despite having similar version numbers. For
discussion, see
[issue #170](https://github.com/tokio-rs/tracing-opentelemetry/issues/170).

Importantly, `tracing-opentelemetry` 0.26 is compatible with **0.25** of the
OpenTelemetry crates, as their 0.26 has breaking changes that have not yet (as
of 2024-10-08) been addressed in this crate.


## Examples

### Basic Usage
Expand Down Expand Up @@ -94,16 +106,36 @@ fn main() {
`Cargo.toml`
```toml
[dependencies]
opentelemetry = "0.21"
opentelemetry_sdk = "0.21"
opentelemetry-stdout = { version = "0.2.0", features = ["trace"] }
opentelemetry = "0.25"
opentelemetry_sdk = "0.25"
opentelemetry-stdout = { version = "0.25", features = ["trace"] }
tracing = "0.1"
tracing-opentelemetry = "0.22"
tracing-opentelemetry = "0.26"
tracing-subscriber = "0.3"
```

### Visualization example

See [`opentelemetry-otlp.rs`](examples/opentelemetry-otlp.rs) in the
[`examples`](examples) directory. To use this code in your own project, your
`Cargo.toml` should include the following:

```toml
[dependencies]
tokio = { version = "1", features = ["full"] }
opentelemetry = "0.25"
opentelemetry_sdk = { version = "0.25", features = ["rt-tokio"] }
opentelemetry-stdout = "0.25"
opentelemetry-otlp = "0.25"
opentelemetry-semantic-conventions = "0.25"
tracing = "0.1"
tracing-core = "0.1"
tracing-opentelemetry = "0.26"
tracing-subscriber = "0.3"
```

To run the example from this repository:

```console
# Run a supported collector like jaeger in the background
$ docker run -d -p4317:4317 -p16686:16686 jaegertracing/all-in-one:latest
Expand Down
Loading