Skip to content

Commit 6e9323f

Browse files
authored
Merge branch 'main' into cijothomas/fix-hash
2 parents 2ff124c + 58ec379 commit 6e9323f

File tree

196 files changed

+6999
-5986
lines changed

Some content is hidden

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

196 files changed

+6999
-5986
lines changed

.cspell.json

+4-1
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,17 +41,19 @@
4041
"Kühle",
4142
"Kumar",
4243
"Lalit",
44+
"LIBCLANG",
4345
"msrv",
4446
"Ochtman",
45-
"openetelemetry",
4647
"opentelemetry",
4748
"OTLP",
4849
"protoc",
4950
"quantile",
5051
"Redelmeier",
5152
"reqwest",
53+
"runtimes",
5254
"rustc",
5355
"Tescher",
56+
"tracerprovider",
5457
"Zhongyang",
5558
"zipkin"
5659
],

.github/codecov.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ ignore:
2222
- "opentelemetry-jaeger/examples"
2323
- "opentelemetry-zipkin/examples"
2424
- "opentelemetry-otlp/examples"
25-
- "opentelemetry-aws/examples"
26-
- "opentelemetry-datadog/examples"
27-
- "opentelemetry-dynatrace/examples"
2825
- "opentelemetry-http/examples"
2926
- "opentelemetry-prometheus/examples"
30-
- "opentelemetry-zpages/examples"
27+
- "opentelemetry-appender-tracing/examples"
28+
- "opentelemetry-appender-log/examples"
29+
# stress test
30+
- "stress"

.github/dependabot.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
open-pull-requests-limit: 10
8+
- package-ecosystem: "docker"
9+
directory: "/"
10+
schedule:
11+
interval: "monthly"
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: "monthly"

.github/workflows/ci.yml

+16-15
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,29 @@ jobs:
2121
sudo rm -rf /usr/local/lib/android
2222
sudo rm -rf /usr/share/dotnet
2323
df -h
24-
- uses: actions/checkout@v1
24+
- uses: actions/checkout@v4
2525
with:
2626
submodules: true
2727
- uses: actions-rs/toolchain@v1
2828
with:
2929
toolchain: ${{ matrix.rust }}
3030
components: rustfmt
3131
profile: minimal
32-
- uses: arduino/setup-protoc@v1
32+
- uses: arduino/setup-protoc@v3
3333
- name: Test
3434
run: ./scripts/test.sh
3535
lint:
3636
runs-on: ubuntu-latest
3737
steps:
38-
- uses: actions/checkout@v1
38+
- uses: actions/checkout@v4
3939
with:
4040
submodules: true
4141
- uses: actions-rs/toolchain@v1
4242
with:
4343
toolchain: stable
4444
components: rustfmt
4545
profile: minimal
46-
- uses: arduino/setup-protoc@v1
46+
- uses: arduino/setup-protoc@v3
4747
- uses: actions-rs/cargo@v1
4848
with:
4949
command: fmt
@@ -56,10 +56,10 @@ jobs:
5656
example: [opentelemetry, opentelemetry-sdk]
5757
runs-on: ubuntu-latest
5858
steps:
59-
- uses: actions/checkout@v2
59+
- uses: actions/checkout@v4
6060
- uses: actions-rs/toolchain@v1
6161
with:
62-
toolchain: nightly
62+
toolchain: nightly-2024-02-07
6363
components: rustfmt
6464
override: true
6565
- name: external-type-check
@@ -70,26 +70,26 @@ jobs:
7070
non-default-examples:
7171
strategy:
7272
matrix:
73-
example: [opentelemetry-otlp/examples/external-otlp-grpcio-async-std, opentelemetry-otlp/examples/basic-otlp]
73+
example: [opentelemetry-otlp/examples/basic-otlp]
7474
runs-on: ubuntu-latest
7575
steps:
76-
- uses: actions/checkout@v1
76+
- uses: actions/checkout@v4
7777
with:
7878
submodules: true
7979
- uses: actions-rs/toolchain@v1
8080
with:
8181
toolchain: stable
8282
components: rustfmt
8383
profile: minimal
84-
- uses: arduino/setup-protoc@v1
84+
- uses: arduino/setup-protoc@v3
8585
- name: Build
8686
run: |
8787
cd ${{ matrix.example }}
8888
cargo build --verbose
8989
msrv:
9090
runs-on: ubuntu-latest
9191
steps:
92-
- uses: actions/checkout@v1
92+
- uses: actions/checkout@v4
9393
with:
9494
submodules: true
9595
- uses: actions-rs/toolchain@v1
@@ -108,21 +108,21 @@ jobs:
108108
runs-on: ubuntu-latest
109109
continue-on-error: true # Prevent sudden announcement of a new advisory from failing ci
110110
steps:
111-
- uses: actions/checkout@v2
111+
- uses: actions/checkout@v4
112112
- uses: EmbarkStudios/cargo-deny-action@v1
113113
with:
114114
command: check advisories
115115
docs:
116116
continue-on-error: true
117117
runs-on: ubuntu-latest
118118
steps:
119-
- uses: actions/checkout@v2
119+
- uses: actions/checkout@v4
120120
- uses: actions-rs/toolchain@v1
121121
with:
122122
toolchain: nightly
123123
components: rustfmt
124124
override: true
125-
- uses: arduino/setup-protoc@v1
125+
- uses: arduino/setup-protoc@v3
126126
- name: doc
127127
run: cargo doc --no-deps --all-features
128128
env:
@@ -131,16 +131,17 @@ jobs:
131131
coverage:
132132
continue-on-error: true
133133
runs-on: ubuntu-latest
134+
if: ${{ ! contains(github.event.pull_request.labels.*.name, 'dependencies') }}
134135
steps:
135-
- uses: actions/checkout@v3
136+
- uses: actions/checkout@v4
136137
with:
137138
submodules: true
138139
- uses: actions-rs/toolchain@v1
139140
with:
140141
toolchain: stable
141142
components: rustfmt,llvm-tools-preview
142143
override: true
143-
- uses: arduino/setup-protoc@v1
144+
- uses: arduino/setup-protoc@v3
144145
- name: cargo install cargo-llvm-cov
145146
uses: taiki-e/install-action@cargo-llvm-cov
146147
- name: cargo generate-lockfile

.github/workflows/integration_tests.yml

+15-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,20 @@ jobs:
1111
timeout-minutes: 10
1212
if: ${{ github.event.label.name == 'integration tests' || contains(github.event.pull_request.labels.*.name, 'integration tests') }}
1313
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v2
14+
- name: Free disk space
15+
run: |
16+
df -h
17+
sudo rm -rf /usr/local/lib/android
18+
sudo rm -rf /usr/share/dotnet
19+
df -h
20+
- uses: actions/checkout@v4
21+
with:
22+
submodules: true
23+
- uses: actions-rs/toolchain@v1
24+
with:
25+
toolchain: stable
26+
components: rustfmt
27+
profile: minimal
28+
- uses: arduino/setup-protoc@v3
1629
- name: Run integration tests using docker compose
1730
run: ./scripts/integration_tests.sh
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Markdown link check
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
paths:
9+
- '**/*.md'
10+
11+
jobs:
12+
markdown-link-check:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Install markdown-link-check
18+
run: npm install -g markdown-link-check
19+
20+
- name: Run markdown-link-check
21+
run: |
22+
find . -type f \
23+
-name '*.md' \
24+
-not -path '**/CHANGELOG.md' \
25+
| xargs ./scripts/markdown-link-check-with-retry.sh

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
**/*.rs.bk
55
Cargo.lock
66
/.idea/
7+
8+
.cosine

CONTRIBUTING.md

+36-36
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Contributing to opentelemetry-rust
22

3-
The Rust special interest group (SIG) meets weekly on Tuesdays at 8 AM Pacific
4-
Time (16:00 UTC). The meeting is subject to change depending on contributors'
3+
The Rust special interest group (SIG) meets weekly on Tuesdays at 9 AM Pacific
4+
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
@@ -126,7 +135,7 @@ For a deeper discussion, see:
126135

127136
Currently, the Opentelemetry Rust SDK has two ways to handle errors. In the situation where errors are not allowed to return. One should call global error handler to process the errors. Otherwise, one should return the errors.
128137

129-
The Opentelemetry Rust SDK comes with an error type `openetelemetry::Error`. For different function, one error has been defined. All error returned by trace module MUST be wrapped in `opentelemetry::trace::TraceError`. All errors returned by metrics module MUST be wrapped in `opentelemetry::metrics::MetricsError`.
138+
The Opentelemetry Rust SDK comes with an error type `opentelemetry::Error`. For different function, one error has been defined. All error returned by trace module MUST be wrapped in `opentelemetry::trace::TraceError`. All errors returned by metrics module MUST be wrapped in `opentelemetry::metrics::MetricsError`. All errors returned by logs module MUST be wrapped in `opentelemetry::logs::LogsError`.
130139

131140
For users that want to implement their own exporters. It's RECOMMENDED to wrap all errors from the exporter into a crate-level error type, and implement `ExporterError` trait.
132141

@@ -137,6 +146,28 @@ 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

149+
### Experimental/Unstable features
150+
151+
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:
152+
153+
```rust
154+
#[cfg(feature = "otel_unstable")]
155+
{
156+
// Your feature implementation
157+
}
158+
```
159+
160+
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.
161+
162+
### Optional features
163+
164+
The potential features include:
165+
166+
- Stable and non-experimental features that compliant to specification, and have a feature flag to minimize compilation size. Example: feature flags for signals (like `logs`, `traces`, `metrics`) and runtimes (`rt-tokio`, `rt-tokio-current-thread`, `rt-async-std`).
167+
- Stable and non-experimental features, although not part of the specification, are crucial for enhancing the tracing/log crate's functionality or boosting performance. These features are also subject to discussion and approval by the OpenTelemetry Rust Maintainers. An example of such a feature is `logs_level_enabled`.
168+
169+
All such features should adhere to naming convention `<signal>_<feature_name>`
170+
140171
## Style Guide
141172

142173
- Run `cargo clippy --all` - this will catch common mistakes and improve
@@ -152,37 +183,6 @@ projects in this workspace.
152183
- Run `cargo bench` - this will run benchmarks to show performance
153184
regressions
154185

155-
## Approvers and Maintainers
156-
157-
For GitHub groups see the [code owners](CODEOWNERS) file.
158-
159-
### Maintainers
160-
161-
* [Cijo Thomas](https://github.com/cijothomas)
162-
* [Harold Dost](https://github.com/hdost)
163-
* [Julian Tescher](https://github.com/jtescher)
164-
* [Zhongyang Wu](https://github.com/TommyCpp)
165-
166-
### Approvers
167-
168-
* [Lalit Kumar Bhasin](https://github.com/lalitb)
169-
* [Shaun Cox](https://github.com/shaun-cox)
170-
171-
### Emeritus
172-
173-
- [Dirkjan Ochtman](https://github.com/djc)
174-
- [Jan Kühle](https://github.com/frigus02)
175-
- [Isobel Redelmeier](https://github.com/iredelmeier)
176-
177-
### Become an Approver or a Maintainer
178-
179-
See the [community membership document in OpenTelemetry community
180-
repo](https://github.com/open-telemetry/community/blob/master/community-membership.md).
181-
182-
### Thanks to all the people who have contributed
183-
184-
[![contributors](https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-rust)](https://github.com/open-telemetry/opentelemetry-rust/graphs/contributors)
185-
186186
## FAQ
187187

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

0 commit comments

Comments
 (0)