Skip to content

Commit ebe4a38

Browse files
authored
Merge branch 'main' into two-level-hash
2 parents 2930fe1 + 5e67cae commit ebe4a38

File tree

43 files changed

+407
-855
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+407
-855
lines changed

.cspell.json

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"appenders",
3131
"Bhasin",
3232
"Cijo",
33+
"clippy",
3334
"codecov",
3435
"deque",
3536
"Dirkjan",
@@ -40,6 +41,7 @@
4041
"Kühle",
4142
"Kumar",
4243
"Lalit",
44+
"LIBCLANG",
4345
"msrv",
4446
"Ochtman",
4547
"opentelemetry",
@@ -48,6 +50,7 @@
4850
"quantile",
4951
"Redelmeier",
5052
"reqwest",
53+
"runtimes",
5154
"rustc",
5255
"Tescher",
5356
"tracerprovider",

CONTRIBUTING.md

+14-36
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The Rust special interest group (SIG) meets weekly on Tuesdays at 9 AM Pacific
44
Time. The meeting is subject to change depending on contributors'
55
availability. Check the [OpenTelemetry community
6-
calendar](https://calendar.google.com/calendar/embed?src=google.com_b79e3e90j7bbsa2n2p5an5lf60%40group.calendar.google.com)
6+
calendar](https://github.com/open-telemetry/community?tab=readme-ov-file#calendar)
77
for specific dates and for Zoom meeting links. "OTel Rust SIG" is the name of
88
meeting for this group.
99

@@ -17,6 +17,15 @@ regardless of your experience level. Whether you're a seasoned OpenTelemetry
1717
developer, just starting your journey, or simply curious about the work we do,
1818
you're more than welcome to participate!
1919

20+
Even though, anybody can contribute, there are benefits of being a member of our
21+
community. See to the [community membership
22+
document](https://github.com/open-telemetry/community/blob/main/community-membership.md)
23+
on how to become a
24+
[**Member**](https://github.com/open-telemetry/community/blob/main/community-membership.md#member),
25+
[**Approver**](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
26+
and
27+
[**Maintainer**](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).
28+
2029
## Pull Requests
2130

2231
### Prerequisites
@@ -65,7 +74,7 @@ Open a pull request against the main
6574
repo.
6675

6776
> **Note**
68-
> It is recommended to run [pre-commit script](precommit.sh) from the root of
77+
> It is recommended to run [pre-commit script](scripts/precommit.sh) from the root of
6978
the repo to catch any issues locally.
7079

7180
### How to Receive Comments
@@ -137,7 +146,7 @@ OpenTelemetry supports multiple ways to configure the API, SDK and other compone
137146
- Environment variables
138147
- Compiling time configurations provided in the source code
139148

140-
### Experimental/Unstable features:
149+
### Experimental/Unstable features
141150

142151
Use `otel_unstable` feature flag for implementation of specification with [experimental](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.27.0/specification/document-status.md) status. This approach ensures clear demarcation and safe integration of new or evolving features. Utilize the following structure:
143152

@@ -147,9 +156,10 @@ Use `otel_unstable` feature flag for implementation of specification with [exper
147156
// Your feature implementation
148157
}
149158
```
159+
150160
It's important to regularly review and remove the `otel_unstable` flag from the code once the feature becomes stable. This cleanup process is crucial to maintain the overall code quality and to ensure that stable features are accurately reflected in the main build.
151161

152-
### Optional features:
162+
### Optional features
153163

154164
The potential features include:
155165

@@ -173,38 +183,6 @@ projects in this workspace.
173183
- Run `cargo bench` - this will run benchmarks to show performance
174184
regressions
175185

176-
## Approvers and Maintainers
177-
178-
For GitHub groups see the [code owners](CODEOWNERS) file.
179-
180-
### Maintainers
181-
182-
* [Cijo Thomas](https://github.com/cijothomas)
183-
* [Harold Dost](https://github.com/hdost)
184-
* [Julian Tescher](https://github.com/jtescher)
185-
* [Zhongyang Wu](https://github.com/TommyCpp)
186-
187-
### Approvers
188-
189-
* [Lalit Kumar Bhasin](https://github.com/lalitb)
190-
* [Shaun Cox](https://github.com/shaun-cox)
191-
192-
### Emeritus
193-
194-
- [Dirkjan Ochtman](https://github.com/djc)
195-
- [Jan Kühle](https://github.com/frigus02)
196-
- [Isobel Redelmeier](https://github.com/iredelmeier)
197-
- [Mike Goldsmith](https://github.com/MikeGoldsmith)
198-
199-
### Become an Approver or a Maintainer
200-
201-
See the [community membership document in OpenTelemetry community
202-
repo](https://github.com/open-telemetry/community/blob/master/community-membership.md).
203-
204-
### Thanks to all the people who have contributed
205-
206-
[![contributors](https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-rust)](https://github.com/open-telemetry/opentelemetry-rust/graphs/contributors)
207-
208186
## FAQ
209187

210188
### Where should I put third party propagators/exporters, contrib or standalone crates?

Cargo.toml

+14-14
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,31 @@ debug = 1
3838
async-std = "1.10"
3939
async-trait = "0.1"
4040
bytes = "1"
41-
env_logger = "0.10" # env_logger requires a newer MSRV
41+
env_logger = { version = "0.10", default-features = false } # env_logger requires a newer MSRV
4242
futures-core = "0.3"
4343
futures-executor = "0.3"
44-
futures-util = "0.3"
45-
hyper = "0.14"
46-
http = "0.2"
47-
isahc = "1.4"
44+
futures-util = { version = "0.3", default-features = false }
45+
hyper = { version = "0.14", default-features = false }
46+
http = { version = "0.2", default-features = false }
47+
isahc = { version = "1.4", default-features = false }
4848
log = "0.4"
4949
once_cell = "1.13"
5050
ordered-float = "4.0"
5151
pin-project-lite = "0.2"
5252
prost = "0.12"
5353
prost-build = "0.12"
5454
prost-types = "0.12"
55-
rand = "0.8"
55+
rand = { version = "0.8", default-features = false }
5656
reqwest = { version = "0.11", default-features = false }
57-
serde = "1.0"
57+
serde = { version = "1.0", default-features = false }
5858
serde_json = "1.0"
5959
temp-env = "0.3.6"
60-
thiserror = "1"
61-
tonic = "0.11"
60+
thiserror = { version = "1", default-features = false }
61+
tonic = { version = "0.11", default-features = false }
6262
tonic-build = "0.11"
63-
tokio = "1"
63+
tokio = { version = "1", default-features = false }
6464
tokio-stream = "0.1.1"
65-
tracing = "0.1"
66-
tracing-core = "0.1"
67-
tracing-subscriber = "0.3"
68-
url = "2.2"
65+
tracing = { version = "0.1", default-features = false }
66+
tracing-core = { version = "0.1", default-features = false }
67+
tracing-subscriber = { version = "0.3", default-features = false }
68+
url = { version = "2.2", default-features = false }

README.md

+85-77
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
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

73
The Rust [OpenTelemetry](https://opentelemetry.io/) implementation.
@@ -13,10 +9,6 @@ The Rust [OpenTelemetry](https://opentelemetry.io/) implementation.
139
[![codecov](https://codecov.io/gh/open-telemetry/opentelemetry-rust/branch/main/graph/badge.svg)](https://codecov.io/gh/open-telemetry/opentelemetry-rust)
1410
[![Slack](https://img.shields.io/badge/slack-@cncf/otel/rust-brightgreen.svg?logo=slack)](https://cloud-native.slack.com/archives/C03GDP0H023)
1511

16-
[Website](https://opentelemetry.io/) |
17-
[Slack](https://cloud-native.slack.com/archives/C03GDP0H023) |
18-
[Documentation](https://docs.rs/opentelemetry)
19-
2012
## Overview
2113

2214
OpenTelemetry is a collection of tools, APIs, and SDKs used to instrument,
@@ -48,7 +40,6 @@ available:
4840

4941
* [opentelemetry-appender-log](opentelemetry-appender-log/README.md)
5042
* [opentelemetry-appender-tracing](opentelemetry-appender-tracing/README.md)
51-
* opentelemetry-appender-slog // TODO: Add link once available
5243

5344
If you already use the logging APIs from above, continue to use them, and use
5445
the appenders above to bridge the logs to OpenTelemetry. If you are using a
@@ -66,9 +57,9 @@ Project versioning information and stability guarantees can be found
6657
```rust
6758
use opentelemetry::{
6859
global,
69-
sdk::trace::TracerProvider,
7060
trace::{Tracer, TracerProvider as _},
7161
};
62+
use opentelemetry_sdk::trace::TracerProvider;
7263

7364
fn main() {
7465
// Create a new trace pipeline that prints to stdout
@@ -86,84 +77,74 @@ fn main() {
8677
}
8778
```
8879

89-
See the [examples](./examples) directory for different integration patterns.
90-
91-
## Ecosystem
92-
93-
### Related Crates
80+
The example above requires the following packages:
9481

95-
In addition to `opentelemetry`, the [`open-telemetry/opentelemetry-rust`]
96-
repository contains several additional crates designed to be used with the
97-
`opentelemetry` ecosystem. This includes a collection of trace `SpanExporter`
98-
and metrics pull and push controller implementations, as well as utility and
99-
adapter crates to assist in propagating state and instrumenting applications.
82+
```toml
83+
# Cargo.toml
84+
[dependencies]
85+
opentelemetry = "0.22"
86+
opentelemetry_sdk = "0.22"
87+
opentelemetry-stdout = { version = "0.3", features = ["trace"] }
88+
```
10089

101-
In particular, the following crates are likely to be of interest:
90+
See the [examples](./examples) directory for different integration patterns.
10291

103-
* [`opentelemetry-aws`] provides unofficial propagators for AWS X-ray.
104-
* [`opentelemetry-datadog`] provides additional exporters to [`Datadog`].
105-
* [`opentelemetry-dynatrace`] provides additional exporters to Dynatrace.
106-
* [`opentelemetry-contrib`] provides additional exporters and propagators that
107-
are experimental.
108-
* [`opentelemetry-http`] provides an interface for injecting and extracting
109-
trace information from [`http`] headers.
110-
* [`opentelemetry-jaeger`] provides context propagation using [jaeger propagation format](https://www.jaegertracing.io/docs/1.18/client-libraries/#propagation-format).
111-
* [`opentelemetry-otlp`] exporter for sending trace and metric data in the OTLP
112-
format to the OpenTelemetry collector.
92+
## Overview of crates
93+
94+
The following crates are maintained in this repo:
95+
96+
* [`opentelemetry`] This is the OpenTelemetry API crate, and is the crate
97+
required to instrument libraries and applications. It contains Context API,
98+
Baggage API, Propagators API, Logging Bridge API, Metrics API, and Tracing
99+
API.
100+
* [`opentelemetry-sdk`] This is the OpenTelemetry SDK crate, and contains the
101+
official OpenTelemetry SDK implementation. It contains Logging SDK, Metrics
102+
SDK, and Tracing SDK. It also contains propagator implementations.
103+
* [`opentelemetry-otlp`] exporter for sending logs, metrics and traces in the
104+
OTLP format to an endpoint accepting OTLP, like the [OpenTelemetry
105+
collector](https://opentelemetry.io/docs/collector/), or [vendor specific
106+
endpoints](https://opentelemetry.io/ecosystem/vendors/).
107+
* [`opentelemetry-stdout`] exporter for sending logs, metrics and traces to
108+
stdout, for learning/debugging purposes.
109+
* [`opentelemetry-http`] This crate contains utility functions to help with
110+
exporting telemetry, propagation, over [`http`].
111+
* [`opentelemetry-appender-log`] This crate provides logging appender to route
112+
logs emitted using the [log](https://docs.rs/log/latest/log/) crate to
113+
opentelemetry.
114+
* [`opentelemetry-appender-tracing`] This crate provides logging appender to
115+
route logs emitted using the [tracing](https://crates.io/crates/tracing) crate
116+
to opentelemetry.
117+
* [`opentelemetry-jaeger-propagator`] provides context propagation using [jaeger
118+
propagation
119+
format](https://www.jaegertracing.io/docs/1.18/client-libraries/#propagation-format).
113120
* [`opentelemetry-prometheus`] provides a pipeline and exporter for sending
114-
metrics information to [`Prometheus`].
121+
metrics to [`Prometheus`].
115122
* [`opentelemetry-semantic-conventions`] provides standard names and semantic
116123
otel conventions.
117-
* [`opentelemetry-stackdriver`] provides an exporter for Google's [Cloud Trace]
118-
(which used to be called StackDriver).
119-
* [`opentelemetry-zipkin`] provides a pipeline and exporter for sending trace
120-
information to [`Zipkin`].
121-
122-
Additionally, there are also several third-party crates which are not
123-
maintained by the `opentelemetry` project. These include:
124-
125-
* [`tracing-opentelemetry`] provides integration for applications instrumented
126-
using the [`tracing`] API and ecosystem.
127-
* [`actix-web-opentelemetry`] provides integration for the [`actix-web`] web
128-
server and ecosystem.
129-
* [`opentelemetry-application-insights`] provides an unofficial [Azure
130-
Application Insights] exporter.
131-
* [`opentelemetry-tide`] provides integration for the [`Tide`] web server and
132-
ecosystem.
133-
* [`trillium-opentelemetry`] provides metrics instrumentation for [`trillium`] http servers following [semantic-conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-metrics.md).
134-
135-
If you're the maintainer of an `opentelemetry` ecosystem crate not listed
136-
above, please let us know! We'd love to add your project to the list!
137-
138-
[`open-telemetry/opentelemetry-rust`]: https://github.com/open-telemetry/opentelemetry-rust
139-
[`opentelemetry-jaeger`]: https://crates.io/crates/opentelemetry-jaeger
140-
[`opentelemetry-otlp`]: https://crates.io/crates/opentelemetry-otlp
124+
* [`opentelemetry-zipkin`] provides a pipeline and exporter for sending traces
125+
to [`Zipkin`].
126+
127+
In addition, there are several other useful crates in the [OTel Rust Contrib
128+
repo](https://github.com/open-telemetry/opentelemetry-rust-contrib). A lot of
129+
crates maintained outside OpenTelemetry owned repos can be found in the
130+
[OpenTelemetry
131+
Registry](https://opentelemetry.io/ecosystem/registry/?language=rust).
132+
133+
[`opentelemetry`]: https://crates.io/crates/opentelemetry
134+
[`opentelemetry-sdk`]: https://crates.io/crates/opentelemetry-sdk
135+
[`opentelemetry-appender-log`]: https://crates.io/crates/opentelemetry-appender-log
136+
[`opentelemetry-appender-tracing`]: https://crates.io/crates/opentelemetry-appender-tracing
141137
[`opentelemetry-http`]: https://crates.io/crates/opentelemetry-http
138+
[`opentelemetry-otlp`]: https://crates.io/crates/opentelemetry-otlp
139+
[`opentelemetry-stdout`]: https://crates.io/crates/opentelemetry-stdout
140+
[`opentelemetry-jaeger-propagator`]: https://crates.io/crates/opentelemetry-jaeger-propagator
142141
[`opentelemetry-prometheus`]: https://crates.io/crates/opentelemetry-prometheus
143-
[`opentelemetry-aws`]: https://crates.io/crates/opentelemetry-aws
144142
[`Prometheus`]: https://prometheus.io
145143
[`opentelemetry-zipkin`]: https://crates.io/crates/opentelemetry-zipkin
146144
[`Zipkin`]: https://zipkin.io
147-
[`opentelemetry-contrib`]: https://crates.io/crates/opentelemetry-contrib
148-
[`Datadog`]: https://www.datadoghq.com
149-
[`opentelemetry-datadog`]: https://crates.io/crates/opentelemetry-datadog
150-
[`opentelemetry-dynatrace`]: https://crates.io/crates/opentelemetry-dynatrace
151145
[`opentelemetry-semantic-conventions`]: https://crates.io/crates/opentelemetry-semantic-conventions
152146
[`http`]: https://crates.io/crates/http
153147

154-
[`tracing-opentelemetry`]: https://crates.io/crates/tracing-opentelemetry
155-
[`tracing`]: https://crates.io/crates/tracing
156-
[`actix-web-opentelemetry`]: https://crates.io/crates/actix-web-opentelemetry
157-
[`actix-web`]: https://crates.io/crates/actix-web
158-
[`opentelemetry-application-insights`]: https://crates.io/crates/opentelemetry-application-insights
159-
[Azure Application Insights]: https://docs.microsoft.com/azure/azure-monitor/app/app-insights-overview
160-
[`opentelemetry-tide`]: https://crates.io/crates/opentelemetry-tide
161-
[`Tide`]: https://crates.io/crates/tide
162-
[`opentelemetry-stackdriver`]: https://crates.io/crates/opentelemetry-stackdriver
163-
[Cloud Trace]: https://cloud.google.com/trace/
164-
[`trillium-opentelemetry`]: https://github.com/trillium-rs/trillium-opentelemetry
165-
[`trillium`]: https://github.com/trillium-rs/trillium
166-
167148
## Supported Rust Versions
168149

169150
OpenTelemetry is built against the latest stable release. The minimum supported
@@ -182,9 +163,9 @@ this policy.
182163
See the [contributing file](CONTRIBUTING.md).
183164

184165
The Rust special interest group (SIG) meets weekly on Tuesdays at 9 AM Pacific
185-
Time. The meeting is subject to change depending on contributors'
186-
availability. Check the [OpenTelemetry community
187-
calendar](https://calendar.google.com/calendar/embed?src=google.com_b79e3e90j7bbsa2n2p5an5lf60%40group.calendar.google.com)
166+
Time. The meeting is subject to change depending on contributors' availability.
167+
Check the [OpenTelemetry community
168+
calendar](https://github.com/open-telemetry/community?tab=readme-ov-file#calendar)
188169
for specific dates and for Zoom meeting links. "OTel Rust SIG" is the name of
189170
meeting for this group.
190171

@@ -197,3 +178,30 @@ The meeting is open for all to join. We invite everyone to join our meeting,
197178
regardless of your experience level. Whether you're a seasoned OpenTelemetry
198179
developer, just starting your journey, or simply curious about the work we do,
199180
you're more than welcome to participate!
181+
182+
## Approvers and Maintainers
183+
184+
For GitHub groups see the [code owners](CODEOWNERS) file.
185+
186+
### Maintainers
187+
188+
* [Cijo Thomas](https://github.com/cijothomas)
189+
* [Harold Dost](https://github.com/hdost)
190+
* [Julian Tescher](https://github.com/jtescher)
191+
* [Zhongyang Wu](https://github.com/TommyCpp)
192+
193+
### Approvers
194+
195+
* [Lalit Kumar Bhasin](https://github.com/lalitb)
196+
* [Shaun Cox](https://github.com/shaun-cox)
197+
198+
### Emeritus
199+
200+
* [Dirkjan Ochtman](https://github.com/djc)
201+
* [Jan Kühle](https://github.com/frigus02)
202+
* [Isobel Redelmeier](https://github.com/iredelmeier)
203+
* [Mike Goldsmith](https://github.com/MikeGoldsmith)
204+
205+
### Thanks to all the people who have contributed
206+
207+
[![contributors](https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-rust)](https://github.com/open-telemetry/opentelemetry-rust/graphs/contributors)

examples/tracing-grpc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ path = "src/client.rs"
1515

1616
[dependencies]
1717
opentelemetry = { path = "../../opentelemetry" }
18-
opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["rt-tokio"]}
18+
opentelemetry_sdk = { path = "../../opentelemetry-sdk", features = ["rt-tokio"] }
1919
opentelemetry-stdout = { path = "../../opentelemetry-stdout", features = ["trace"] }
2020
prost = { workspace = true }
2121
tokio = { workspace = true, features = ["full"] }

0 commit comments

Comments
 (0)