Skip to content

Commit

Permalink
Minor readme fixes for examples (#1513)
Browse files Browse the repository at this point in the history
  • Loading branch information
cijothomas authored Feb 7, 2024
1 parent aba0af5 commit 8688e7e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
40 changes: 33 additions & 7 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,67 @@
# 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

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*.
2 changes: 1 addition & 1 deletion opentelemetry-sdk/benches/attribute_set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry/src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8688e7e

Please sign in to comment.