Skip to content

Commit 9cd2c44

Browse files
committed
Rewrite readme page for opentelemetry crate
1 parent ef47010 commit 9cd2c44

File tree

2 files changed

+42
-121
lines changed

2 files changed

+42
-121
lines changed

opentelemetry/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "opentelemetry"
33
version = "0.22.0"
4-
description = "A metrics collection and distributed tracing framework"
4+
description = "OpenTelemetry API for Rust"
55
homepage = "https://github.com/open-telemetry/opentelemetry-rust"
66
repository = "https://github.com/open-telemetry/opentelemetry-rust"
77
readme = "README.md"

opentelemetry/README.md

+41-120
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
![OpenTelemetry — An observability framework for cloud-native software.][splash]
2-
3-
[splash]: https://raw.githubusercontent.com/open-telemetry/opentelemetry-rust/main/assets/logo-text.png
4-
51
# OpenTelemetry Rust
62

7-
The Rust [OpenTelemetry](https://opentelemetry.io/) implementation.
3+
This crate contains the [OpenTelemetry](https://opentelemetry.io/) API for Rust.
84

95
[![Crates.io: opentelemetry](https://img.shields.io/crates/v/opentelemetry.svg)](https://crates.io/crates/opentelemetry)
106
[![Documentation](https://docs.rs/opentelemetry/badge.svg)](https://docs.rs/opentelemetry)
@@ -15,124 +11,53 @@ The Rust [OpenTelemetry](https://opentelemetry.io/) implementation.
1511

1612
## Overview
1713

18-
OpenTelemetry is a collection of tools, APIs, and SDKs used to instrument,
19-
generate, collect, and export telemetry data (metrics, logs, and traces) for
20-
analysis in order to understand your software's performance and behavior. You
21-
can export and analyze them using [Prometheus], [Jaeger], and other
22-
observability tools.
14+
OpenTelemetry is an Observability framework and toolkit designed to create and
15+
manage telemetry data such as traces, metrics, and logs. Crucially,
16+
OpenTelemetry is vendor- and tool-agnostic, meaning that it can be used with a
17+
broad variety of Observability backends, including open source tools like
18+
[Jaeger] and [Prometheus], as well as commercial offerings.
19+
20+
OpenTelemetry is not an observability backend like Jaeger, Prometheus, or other
21+
commercial vendors. OpenTelemetry is focused on the generation, collection,
22+
management, and export of telemetry. A major goal of OpenTelemetry is that you
23+
can easily instrument your applications or systems, no matter their language,
24+
infrastructure, or runtime environment. Crucially, the storage and visualization
25+
of telemetry is intentionally left to other tools.
2326

2427
*Compiler support: [requires `rustc` 1.64+][msrv]*
2528

2629
[Prometheus]: https://prometheus.io
2730
[Jaeger]: https://www.jaegertracing.io
2831
[msrv]: #supported-rust-versions
2932

30-
## Getting Started
31-
32-
```rust
33-
use opentelemetry::{
34-
global,
35-
sdk::trace::TracerProvider,
36-
trace::{Tracer, TracerProvider as _},
37-
};
38-
39-
fn main() {
40-
// Create a new trace pipeline that prints to stdout
41-
let provider = TracerProvider::builder()
42-
.with_simple_exporter(opentelemetry_stdout::SpanExporter::default())
43-
.build();
44-
let tracer = provider.tracer("readme_example");
45-
46-
tracer.in_span("doing_work", |cx| {
47-
// Traced app logic here...
48-
});
49-
50-
// Shutdown trace pipeline
51-
global::shutdown_tracer_provider();
52-
}
53-
```
54-
55-
See the [examples](../examples) directory for different integration patterns.
56-
57-
## Ecosystem
58-
59-
### Related Crates
60-
61-
In addition to `opentelemetry`, which only carries the API, the
62-
[`open-telemetry/opentelemetry-rust`] repository contains several additional
63-
crates designed to be used with the `opentelemetry` ecosystem. This includes a
64-
collection of trace `SpanExporter` and metrics pull and push controller
65-
implementations, as well as utility and adapter crates to assist in propagating
66-
state and instrumenting applications.
67-
68-
In particular, the following crates are likely to be of interest:
69-
70-
- [`opentelemetry-aws`] provides unofficial propagators for AWS X-ray.
71-
- [`opentelemetry-contrib`] provides additional exporters and propagators that
72-
are experimental.
73-
- [`opentelemetry-datadog`] provides additional exporters to [`Datadog`].
74-
- [`opentelemetry-dynatrace`] *Deprecated, last release 0.4.0* provides additional exporters to [`Dynatrace`]. See [README][`opentelemetry-dynatrace-readme`]
75-
- [`opentelemetry-http`] provides an interface for injecting and extracting
76-
trace information from [`http`] headers.
77-
- [`opentelemetry-jaeger`] provides a pipeline and exporter for sending trace
78-
information to [`Jaeger`].
79-
- [`opentelemetry-otlp`] exporter for sending trace and metric data in the OTLP
80-
format to the OpenTelemetry collector.
81-
- [`opentelemetry-prometheus`] provides a pipeline and exporter for sending
82-
metrics information to [`Prometheus`].
83-
- [`opentelemetry_sdk`] provides the standard reference implementation of
84-
opentelemetry.
85-
- [`opentelemetry-semantic-conventions`] provides standard names and semantic
86-
otel conventions.
87-
- [`opentelemetry-stackdriver`] provides an exporter for Google's [Cloud Trace]
88-
(which used to be called StackDriver).
89-
- [`opentelemetry-zipkin`] provides a pipeline and exporter for sending trace
90-
information to [`Zipkin`].
91-
92-
Additionally, there are also several third-party crates which are not
93-
maintained by the `opentelemetry` project. These include:
94-
95-
- [`tracing-opentelemetry`] provides integration for applications instrumented
96-
using the [`tracing`] API and ecosystem.
97-
- [`actix-web-opentelemetry`] provides integration for the [`actix-web`] web
98-
server and ecosystem.
99-
- [`opentelemetry-application-insights`] provides an unofficial [Azure
100-
Application Insights] exporter.
101-
- [`opentelemetry-tide`] provides integration for the [`Tide`] web server and
102-
ecosystem.
103-
104-
If you're the maintainer of an `opentelemetry` ecosystem crate not listed
105-
above, please let us know! We'd love to add your project to the list!
106-
107-
[`open-telemetry/opentelemetry-rust`]: https://github.com/open-telemetry/opentelemetry-rust
108-
[`opentelemetry-jaeger`]: https://crates.io/crates/opentelemetry-jaeger
109-
[`Jaeger`]: https://www.jaegertracing.io
110-
[`opentelemetry-otlp`]: https://crates.io/crates/opentelemetry-otlp
111-
[`opentelemetry-http`]: https://crates.io/crates/opentelemetry-http
112-
[`opentelemetry-prometheus`]: https://crates.io/crates/opentelemetry-prometheus
113-
[`opentelemetry-aws`]: https://crates.io/crates/opentelemetry-aws
114-
[`Prometheus`]: https://prometheus.io
115-
[`opentelemetry-zipkin`]: https://crates.io/crates/opentelemetry-zipkin
116-
[`Zipkin`]: https://zipkin.io
117-
[`opentelemetry-contrib`]: https://crates.io/crates/opentelemetry-contrib
118-
[`Datadog`]: https://www.datadoghq.com
119-
[`Dynatrace`]: https://www.dynatrace.com
120-
[`opentelemetry-datadog`]: https://crates.io/crates/opentelemetry-datadog
121-
[`opentelemetry-dynatrace`]: https://crates.io/crates/opentelemetry-dynatrace
122-
[`opentelemetry-dynatrace-readme`]: https://github.com/open-telemetry/opentelemetry-rust-contrib/blob/main/opentelemetry-dynatrace/README.md
123-
[`opentelemetry-semantic-conventions`]: https://crates.io/crates/opentelemetry-semantic-conventions
124-
[`http`]: https://crates.io/crates/http
125-
126-
[`tracing-opentelemetry`]: https://crates.io/crates/tracing-opentelemetry
127-
[`tracing`]: https://crates.io/crates/tracing
128-
[`actix-web-opentelemetry`]: https://crates.io/crates/actix-web-opentelemetry
129-
[`actix-web`]: https://crates.io/crates/actix-web
130-
[`opentelemetry-application-insights`]: https://crates.io/crates/opentelemetry-application-insights
131-
[Azure Application Insights]: https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview
132-
[`opentelemetry-tide`]: https://crates.io/crates/opentelemetry-tide
133-
[`Tide`]: https://crates.io/crates/tide
134-
[`opentelemetry-stackdriver`]: https://crates.io/crates/opentelemetry-stackdriver
135-
[Cloud Trace]: https://cloud.google.com/trace/
33+
### What does this crate contain?
34+
35+
This is the API crate which contains the [Context
36+
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md),
37+
[Propagators
38+
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/api-propagators.md),[Baggage
39+
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/baggage/api.md),
40+
[Logs Bridge
41+
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md),
42+
[Tracing
43+
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md),
44+
and [Metrics
45+
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md).
46+
47+
This crates allows one to instrument libraries and application, but the APIs in
48+
this crate are ["no-ops" or just
49+
facades](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/library-guidelines.md#api-and-minimal-implementation),
50+
with actual implementation occurring in the
51+
[opentelemetry-sdk](https://crates.io/crates/opentelemetry-sdk). This crate does
52+
not deal with concepts such as processing or exporting of telemetry, they are
53+
handled by the [opentelemetry-sdk](https://crates.io/crates/opentelemetry-sdk),
54+
along with one or more exporters like the
55+
[opentelemetry-otlp](https://crates.io/crates/opentelemetry-otlp).
56+
57+
If you are a library author, then this is the crate you should be using to
58+
instrument it. If you are familiar with `tracing` or `log` ecosystem, this crate
59+
is just the facade part, and gets lights up, when the final application uses an
60+
sdk implementation.
13661

13762
## Supported Rust Versions
13863

@@ -146,7 +71,3 @@ version is 1.49, the minimum supported version will not be increased past 1.46,
14671
three minor versions prior. Increasing the minimum supported compiler version
14772
is not considered a semver breaking change as long as doing so complies with
14873
this policy.
149-
150-
## Contributing
151-
152-
See the [contributing file](../CONTRIBUTING.md).

0 commit comments

Comments
 (0)