<commit_before># OpenTelemetry-Rust

[![Crates.io: opentelemetry](https://img.shields.io/crates/v/opentelemetry.svg)](https://crates.io/crates/opentelemetry)
[![Documentation](https://docs.rs/opentelemetry/badge.svg)](https://docs.rs/opentelemetry)
[![Crates.io](https://img.shields.io/crates/l/opentelemetry)](./LICENSE)
[![GitHub Actions CI](https://github.com/open-telemetry/opentelemetry-rust/workflows/CI/badge.svg)](https://github.com/open-telemetry/opentelemetry-rust/actions?query=workflow%3ACI+branch%3Amaster)
[![Gitter chat](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg)](https://gitter.im/open-telemetry/opentelemetry-rust)

The Rust [OpenTelemetry](https://opentelemetry.io/) client.

OpenTelemetry provides a single set of APIs, libraries, agents, and collector services to capture distributed traces 
and metrics from your application. You can analyze them using [Prometheus], [Jaeger], and other observability tools.

[Prometheus]: https://prometheus.io
[Jaeger]: https://www.jaegertracing.io

## Quick Start

```rust
use opentelemetry::{api::TracerGenerics, global, sdk};

fn main() {
    global::set_provider(sdk::Provider::default());

    global::tracer("component-a").with_span("foo", |_span| {
        global::tracer("component-b").with_span("bar", |_span| {
            global::tracer("component-c").with_span("baz", |_span| {<commit_msg>Update readme example code (#111)<commit_after># OpenTelemetry-Rust

[![Crates.io: opentelemetry](https://img.shields.io/crates/v/opentelemetry.svg)](https://crates.io/crates/opentelemetry)
[![Documentation](https://docs.rs/opentelemetry/badge.svg)](https://docs.rs/opentelemetry)
[![Crates.io](https://img.shields.io/crates/l/opentelemetry)](./LICENSE)
[![GitHub Actions CI](https://github.com/open-telemetry/opentelemetry-rust/workflows/CI/badge.svg)](https://github.com/open-telemetry/opentelemetry-rust/actions?query=workflow%3ACI+branch%3Amaster)
[![Gitter chat](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg)](https://gitter.im/open-telemetry/opentelemetry-rust)

The Rust [OpenTelemetry](https://opentelemetry.io/) client.

OpenTelemetry provides a single set of APIs, libraries, agents, and collector services to capture distributed traces 
and metrics from your application. You can analyze them using [Prometheus], [Jaeger], and other observability tools.

[Prometheus]: https://prometheus.io
[Jaeger]: https://www.jaegertracing.io

## Quick Start

```rust
use opentelemetry::{api::TracerGenerics, global, sdk};

fn main() {
    global::set_provider(sdk::Provider::default());

    global::tracer("component-a").in_span("foo", |_context| {
        global::tracer("component-b").in_span("bar", |_context| {
            global::tracer("component-c").in_span("baz", |_context| {
{'fraction_non_alphanumeric': 0.17776986106163165, 'fraction_numerical': 0.008906305664410403, 'mean_word_length': 6.002493765586035, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 24, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6355952', 'n_tokens_mistral': 1013, 'n_tokens_neox': 952, 'n_words': 138}