opentelemetry-rust/examples/tracing-http-propagator
Mohammad Vatandoost c5f97180a3
feat: add shutdown with timeout for traces (#2956)
Co-authored-by: Lalit Kumar Bhasin <lalit_fin@yahoo.com>
Co-authored-by: Cijo Thomas <cijo.thomas@gmail.com>
2025-05-16 07:12:50 -07:00
..
src feat: add shutdown with timeout for traces (#2956) 2025-05-16 07:12:50 -07:00
Cargo.toml perf: Run all benchmarks for shorter time (#2870) 2025-03-28 09:23:06 -07:00
README.md Add warning about Log API that is it not for app users (#1502) 2024-01-30 16:15:05 -05:00

README.md

HTTP Example

This is a simple example using hyper that demonstrates tracing http request from client to server. The example shows key aspects of tracing such as:

  • Root Span (on Client)
  • Child Span from a Remote Parent (on Server)
  • Child Span created on the async function parented by the first level child (on Server)
  • SpanContext Propagation (from Client to Server)
  • Span Events
  • Span Attributes
  • Context propagation across async task boundaries.

Usage

# Run server
$ cargo run --bin http-server

# In another tab, run client
$ cargo run --bin http-client

# The spans should be visible in stdout in the order that they were exported.