diff --git a/examples/README.md b/examples/README.md index 08b29620cc..a4e3148c86 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,10 +1,11 @@ # Examples + This directory contains some examples that should help you get start crates from `opentelemetry-rust`. ## log-basic -**Logs** This example uses following crates from this repo: + - opentelemetry(log) - opentelemetry-appender-log - opentelemetry-stdout @@ -12,30 +13,55 @@ This example uses following crates from this repo: Check this example if you want to understand *how to instrument logs using opentelemetry*. ## metrics-basic -**Metrics** 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 -**Tracing** This example uses following crates from this repo: + - opentelemetry(tracing) - opentelemetry-http - opentelemetry-stdout -## tracing-grpc -**Tracing** +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-stdout +- opentelemetry-otlp The application is built using `tokio`. -Check this example if you want to understand *how to create spans and propagate/restore context in OpenTelemetry*. +Check this example if you want to understand *how to use OTLP Exporter to export traces to Jaeger*. diff --git a/opentelemetry-sdk/benches/attribute_set.rs b/opentelemetry-sdk/benches/attribute_set.rs index 6f3360b9cf..d63b14ab10 100644 --- a/opentelemetry-sdk/benches/attribute_set.rs +++ b/opentelemetry-sdk/benches/attribute_set.rs @@ -3,7 +3,7 @@ use opentelemetry::KeyValue; use opentelemetry_sdk::AttributeSet; // Run this benchmark with: -// cargo bench --bench metric_counter +// cargo bench --bench attribute_set --features=metrics fn criterion_benchmark(c: &mut Criterion) { attribute_set(c); diff --git a/opentelemetry/src/common.rs b/opentelemetry/src/common.rs index 93432d48fe..ba7338d6b2 100644 --- a/opentelemetry/src/common.rs +++ b/opentelemetry/src/common.rs @@ -6,7 +6,7 @@ use std::{fmt, hash}; /// /// See the [attribute naming] spec for guidelines. /// -/// [attribute naming]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.9.0/specification/common/attribute-naming.md +/// [attribute naming]: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/attribute-naming.md #[derive(Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct Key(OtelString);