Skip to content

Commit

Permalink
update rust getting started (#4386)
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangil authored Apr 30, 2024
1 parent c91e271 commit 7e7aab5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
8 changes: 5 additions & 3 deletions content/en/docs/languages/rust/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ Stdout Exporter
[`opentelemetry-stdout`](https://crates.io/crates/opentelemetry-stdout):

```toml
opentelemetry = { version = "{{% version-from-registry otel-rust %}}", features = ["trace"] }
opentelemetry = "{{% version-from-registry otel-rust %}}"
opentelemetry_sdk = "{{% version-from-registry otel-rust-sdk %}}"
opentelemetry-stdout = { version = "{{% version-from-registry exporter-rust-stdout %}}", features = ["trace"] }
```

Expand All @@ -123,8 +124,9 @@ use rand::Rng;
use std::{convert::Infallible, net::SocketAddr};
use opentelemetry::global::ObjectSafeSpan;
use opentelemetry::trace::{SpanKind, Status};
use opentelemetry::sdk::trace::TracerProvider;
use opentelemetry::{global, sdk::propagation::TraceContextPropagator, trace::Tracer};
use opentelemetry::{global, trace::Tracer};
use opentelemetry_sdk::propagation::TraceContextPropagator;
use opentelemetry_sdk::trace::TracerProvider;
use opentelemetry_stdout::SpanExporter;

async fn handle(req: Request<Body>) -> Result<Response<Body>, Infallible> {
Expand Down
2 changes: 1 addition & 1 deletion data/registry/exporter-rust-stdout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ createdAt: 2024-01-19
package:
registry: crates
name: opentelemetry-stdout
version: 0.2.0
version: 0.3.0
16 changes: 16 additions & 0 deletions data/registry/otel-rust-sdk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title: Rust SDK
registryType: core
language: rust
tags:
- rust
license: Apache 2.0
description: The OpenTelemetry SDK for Rust.
authors:
- name: OpenTelemetry Authors
urls:
repo: https://github.com/open-telemetry/opentelemetry-rust
createdAt: 2020-02-04
package:
registry: crates
name: opentelemetry_sdk
version: 0.22.1
4 changes: 2 additions & 2 deletions data/registry/otel-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ language: rust
tags:
- rust
license: Apache 2.0
description: The OpenTelemetry API and SDK for Rust.
description: The OpenTelemetry API for Rust.
authors:
- name: OpenTelemetry Authors
urls:
Expand All @@ -13,4 +13,4 @@ createdAt: 2020-02-04
package:
registry: crates
name: opentelemetry
version: 0.21.0
version: 0.22.0

0 comments on commit 7e7aab5

Please sign in to comment.