Skip to content

Commit 62145a0

Browse files
committed
few tweaks based on feedback
1 parent a64b611 commit 62145a0

File tree

3 files changed

+134
-28
lines changed

3 files changed

+134
-28
lines changed

README.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -157,16 +157,18 @@ Registry](https://opentelemetry.io/ecosystem/registry/?language=rust).
157157

158158
## Supported Rust Versions
159159

160-
OpenTelemetry is built against the latest stable release. The minimum supported
161-
version is 1.70. The current OpenTelemetry version is not guaranteed to build
162-
on Rust versions earlier than the minimum supported version.
163-
164-
The current stable Rust compiler and the three most recent minor versions
165-
before it will always be supported. For example, if the current stable compiler
166-
version is 1.49, the minimum supported version will not be increased past 1.46,
167-
three minor versions prior. Increasing the minimum supported compiler version
168-
is not considered a semver breaking change as long as doing so complies with
169-
this policy.
160+
Components in this repo are built against the latest stable release. The minimum
161+
supported version of `rustc` is 1.70. Any exceptions to this are noted in
162+
indivual readme files of the corresponding create. The current OpenTelemetry
163+
version is not guaranteed to build on Rust versions earlier than the minimum
164+
supported version.
165+
166+
The current stable Rust compiler and the three most recent minor versions before
167+
it will always be supported. For example, if the current stable compiler version
168+
is 1.49, the minimum supported version will not be increased past 1.46, three
169+
minor versions prior. Increasing the minimum supported compiler version is not
170+
considered a semver breaking change as long as doing so complies with this
171+
policy.
170172

171173
## Contributing
172174

opentelemetry/README.md

+122
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,126 @@ This crate contains the [OpenTelemetry](https://opentelemetry.io/) API for Rust.
1515

1616
## Overview
1717

18+
## Overview
19+
20+
OpenTelemetry is an Observability framework and toolkit designed to create and
21+
manage telemetry data such as traces, metrics, and logs. OpenTelemetry is
22+
vendor- and tool-agnostic, meaning that it can be used with a broad variety of
23+
Observability backends, including open source tools like [Jaeger] and
24+
[Prometheus], as well as commercial offerings.
25+
26+
OpenTelemetry is *not* an observability backend like Jaeger, Prometheus, or
27+
other commercial vendors. OpenTelemetry is focused on the generation,
28+
collection, management, and export of telemetry. A major goal of OpenTelemetry
29+
is that you can easily instrument your applications or systems, no matter their
30+
language, infrastructure, or runtime environment. Crucially, the storage and
31+
visualization of telemetry is intentionally left to other tools.
32+
33+
## What does this crate contain?
34+
35+
This crate is basic foundation for integrating OpenTelemetry into libraries and
36+
applications, encompassing several aspects of OpenTelemetry, such as context
37+
management and propagation, baggage, logging, tracing, and metrics. It follows
38+
the [OpenTelemetry
39+
specification](https://github.com/open-telemetry/opentelemetry-specification).
40+
Here's a breakdown of its components:
41+
42+
- **[Context
43+
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md):**
44+
Provides a way to manage and propagate context, which is essential for keeping
45+
track of trace execution across asynchronous tasks.
46+
- **[Propagators
47+
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/api-propagators.md):**
48+
Defines how context can be shared across process boundaries, ensuring
49+
continuity across microservices or distributed systems.
50+
- **[Baggage
51+
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/baggage/api.md):**
52+
Allows for the attachment of metadata (baggage) to telemetry, which can be
53+
used for sharing application-specific information across service boundaries.
54+
- **[Logs Bridge
55+
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/api.md):**
56+
Allows to bridge existing logging mechanisms with OpenTelemetry logging. This
57+
is **NOT** meant for end users to call, instead it is meant to enable writing
58+
bridges/appenders for existing logging mechanisms such as
59+
[log](https://crates.io/crates/log) or
60+
[tracing](https://crates.io/crates/tracing).
61+
- **[Tracing
62+
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md):**
63+
Offers a set of primitives to produce distributed traces to understand the
64+
flow of a request across system boundaries.
65+
- **[Metrics
66+
API](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md):**
67+
Offers a set of primitives to produce measurements of operational metrics like
68+
latency, throughput, or error rates.
69+
70+
This crate serves as a facade or no-op implementation, meaning it defines the
71+
traits for instrumentation but does not itself implement the processing or
72+
exporting of telemetry data. This separation of concerns allows library authors
73+
to depend on the API crate without tying themselves to a specific
74+
implementation.
75+
76+
Actual implementation and the heavy lifting of telemetry data collection,
77+
processing, and exporting are delegated to the
78+
[opentelemetry-sdk](https://crates.io/crates/opentelemetry-sdk) crate and
79+
various exporter crates such as
80+
[opentelemetry-otlp](https://crates.io/crates/opentelemetry-otlp). This
81+
architecture ensures that the final application can light up the instrumentation
82+
by integrating an SDK implementation.
83+
84+
Library authors are recommended to depend on this crate *only*. This approach is
85+
also aligned with the design philosophy of existing telemetry solutions in the
86+
Rust ecosystem, like `tracing` or `log`, where these crates only offer a facade
87+
and the actual functionality is enabled through additional crates.
88+
89+
## Related crates
90+
91+
Unless you are a library author, you will almost always need to use additional
92+
crates along with this. Given this crate has no-op implementation only, an
93+
OpenTelemetry SDK is always required.
94+
[opentelemetry-sdk](https://crates.io/crates/opentelemetry-sdk) is the official
95+
SDK implemented by OpenTelemetry itself, though it is possible to use a
96+
different sdk.
97+
98+
Additionally one or more exporters are also required to export telemetry to a
99+
destination. OpenTelemetry provides the following exporters:
100+
101+
- **[opentelemetry-stdout](https://crates.io/crates/opentelemetry-stdout):**
102+
Prints telemetry to stdout, primarily used for learning/debugging purposes.
103+
- **[opentelemetry-otlp](https://crates.io/crates/opentelemetry-otlp):** Exports
104+
telemetry (logs, metrics and traces) in the [OTLP
105+
format](https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/protocol)
106+
to an endpoint accepting OTLP. This could be the [OTel
107+
Collector](https://github.com/open-telemetry/opentelemetry-collector),
108+
telemetry backends like [Jaeger](https://www.jaegertracing.io/),
109+
[Prometheus](https://prometheus.io/docs/prometheus/latest/feature_flags/#otlp-receiver)
110+
or [vendor specific endpoints](https://opentelemetry.io/ecosystem/vendors/).
111+
- **[opentelemetry-zipkin](https://crates.io/crates/opentelemetry-zipkin):**
112+
Exports telemetry (traces only) to Zipkin following [OpenTelemetry to Zipkin
113+
specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk_exporters/zipkin.md)
114+
- **[opentelemetry-prometheus](https://crates.io/crates/opentelemetry-prometheus):**
115+
Exports telemetry (metrics only) to Prometheus following [OpenTelemetry to
116+
Prometheus
117+
specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/prometheus.md)
118+
119+
OpenTelemetry Rust also has a [contrib
120+
repo](https://github.com/open-telemetry/opentelemetry-rust-contrib), where
121+
additional exporters could be found. Check [OpenTelemetry
122+
Registry](https://opentelemetry.io/ecosystem/registry/?language=rust) for
123+
additional exporters and other related components as well.
124+
125+
## Supported Rust Versions
126+
127+
This crate is built against the latest stable release. The minimum supported
128+
version is 1.70. The current version is not guaranteed to build on Rust versions
129+
earlier than the minimum supported version.
130+
131+
The current stable Rust compiler and the three most recent minor versions
132+
before it will always be supported. For example, if the current stable
133+
compiler version is 1.49, the minimum supported version will not be
134+
increased past 1.46, three minor versions prior. Increasing the minimum
135+
supported compiler version is not considered a semver breaking change as
136+
long as doing so complies with this policy.
137+
138+
## Usage
139+
18140
See [docs](https://docs.rs/opentelemetry).

opentelemetry/src/lib.rs

-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! Implements the [`API`] component of [OpenTelemetry].
22
//!
3-
//! *[Supported Rust Versions](#supported-rust-versions)*
4-
//!
53
//! [`API`]: https://opentelemetry.io/docs/specs/otel/overview/#api
64
//! [OpenTelemetry]: https://opentelemetry.io/docs/what-is-opentelemetry/
75
//!
@@ -240,22 +238,6 @@
240238
//! [`Prometheus`]: https://prometheus.io
241239
//! [`Zipkin`]: https://zipkin.io
242240
//!
243-
//! ## Supported Rust Versions
244-
//!
245-
//! OpenTelemetry is built against the latest stable release. The minimum
246-
//! supported version is 1.70. The current OpenTelemetry version is not
247-
//! guaranteed to build on Rust versions earlier than the minimum supported
248-
//! version.
249-
//! This crate is built against the latest stable release. The minimum supported
250-
//! version is 1.70. The current version is not guaranteed to build on Rust
251-
//! versions earlier than the minimum supported version.
252-
//!
253-
//! The current stable Rust compiler and the three most recent minor versions
254-
//! before it will always be supported. For example, if the current stable
255-
//! compiler version is 1.49, the minimum supported version will not be
256-
//! increased past 1.46, three minor versions prior. Increasing the minimum
257-
//! supported compiler version is not considered a semver breaking change as
258-
//! long as doing so complies with this policy.
259241
#![warn(
260242
future_incompatible,
261243
missing_debug_implementations,

0 commit comments

Comments
 (0)