opentelemetry-rust/examples
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
..
logs-basic feat: Leverage Suppression Context in Sdk (#2868) 2025-03-28 10:51:40 -07:00
metrics-advanced chore: Fix changelogs and few nits (#2929) 2025-04-13 18:24:26 -07:00
metrics-basic chore: Fix changelogs and few nits (#2929) 2025-04-13 18:24:26 -07:00
tracing-grpc ci: run clippy on features separately to find issues (#2866) 2025-03-28 09:38:51 -07:00
tracing-http-propagator feat: add shutdown with timeout for traces (#2956) 2025-05-16 07:12:50 -07:00
README.md Remove self diagnostics example (#2404) 2024-12-10 11:53:13 -08:00

README.md

Examples

This directory contains some examples that should help you get start crates from opentelemetry-rust.

log-basic

This example uses following crates from this repo:

  • opentelemetry(log)
  • opentelemetry-appender-tracing
  • opentelemetry-stdout

Check this example if you want to understand how to instrument logs using opentelemetry.

metrics-basic

This example uses following crates from this repo:

  • opentelemetry(metrics)
  • opentelemetry-stdout

Check this example if you want to understand how to instrument metrics using opentelemetry.

metrics-advanced

This example uses following crates from this repo:

  • opentelemetry(metrics)
  • opentelemetry-stdout

This builds on top of the metrics-basic, and shows advanced features in Metrics SDK like using Views.

tracing-grpc

This example uses following crates from this repo:

  • opentelemetry(tracing)
  • opentelemetry-stdout

The application is built using tokio.

Check this example if you want to understand how to create spans and propagate/restore context in OpenTelemetry in a gRPC client-server application.

tracing-http-propagator

This example uses following crates from this repo:

  • opentelemetry(tracing)
  • opentelemetry-http
  • opentelemetry-stdout

Check this example if you want to understand how to create spans and propagate/restore context in OpenTelemetry in an HTTP client-server application.

tracing-jaeger

This example uses following crates from this repo:

  • opentelemetry(tracing)
  • opentelemetry-otlp

The application is built using tokio.

Check this example if you want to understand how to use OTLP Exporter to export traces to Jaeger.