@@ -12,12 +12,12 @@ This crate contains the [OpenTelemetry](https://opentelemetry.io/) API for Rust.
12
12
## Overview
13
13
14
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.
15
+ manage telemetry data such as traces, metrics, and logs. OpenTelemetry is
16
+ vendor- and tool-agnostic, meaning that it can be used with a broad variety of
17
+ Observability backends, including open source tools like [ Jaeger ] and
18
+ [ Prometheus] , as well as commercial offerings.
19
19
20
- OpenTelemetry is not an observability backend like Jaeger, Prometheus, or other
20
+ OpenTelemetry is * not* an observability backend like Jaeger, Prometheus, or other
21
21
commercial vendors. OpenTelemetry is focused on the generation, collection,
22
22
management, and export of telemetry. A major goal of OpenTelemetry is that you
23
23
can easily instrument your applications or systems, no matter their language,
@@ -32,32 +32,63 @@ of telemetry is intentionally left to other tools.
32
32
33
33
### What does this crate contain?
34
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.
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/bridge-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
+ ## Getting started
90
+
91
+ See [ docs] ( https://docs.rs/opentelemetry ) .
61
92
62
93
## Supported Rust Versions
63
94
0 commit comments