Skip to content

Commit d61a53c

Browse files
Merge branch 'main' into dz/axum
2 parents f24cc9d + 08a1f52 commit d61a53c

File tree

309 files changed

+24069
-12713
lines changed

Some content is hidden

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

309 files changed

+24069
-12713
lines changed

.cspell.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,41 +26,62 @@
2626
// workspace dictionary.
2727
"words": [
2828
"actix",
29+
"anyvalue",
2930
"appender",
3031
"appenders",
3132
"Bhasin",
33+
"BLRP",
3234
"Cijo",
3335
"clippy",
36+
"clonable",
3437
"codecov",
3538
"datapoint",
3639
"deque",
3740
"Dirkjan",
41+
"docsrs",
42+
"Dwarnings",
3843
"EPYC",
44+
"flamegraph",
3945
"hasher",
4046
"Isobel",
4147
"jaegertracing",
4248
"Kühle",
4349
"Kumar",
4450
"Lalit",
4551
"LIBCLANG",
52+
"MILLIS",
4653
"msrv",
4754
"mykey",
4855
"myvalue",
4956
"nocapture",
5057
"Ochtman",
5158
"opentelemetry",
59+
"OTELCOL",
5260
"OTLP",
61+
"periodicreader",
62+
"Pillai",
63+
"pprof",
64+
"prost",
5365
"protoc",
5466
"quantile",
5567
"Redelmeier",
5668
"reqwest",
69+
"rstest",
5770
"runtimes",
5871
"rustc",
72+
"rustls",
73+
"semconv",
74+
"serde",
5975
"shoppingcart",
6076
"struct",
6177
"Tescher",
78+
"testcontainers",
79+
"testresults",
80+
"thiserror",
6281
"tracerprovider",
82+
"Umesan",
6383
"updown",
84+
"Utkarsh",
6485
"Zhongyang",
6586
"zipkin"
6687
],

.github/workflows/ci.yml

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- main
99
paths-ignore:
1010
- '**.md'
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
1114
jobs:
1215
test:
1316
strategy:
@@ -22,8 +25,9 @@ jobs:
2225
- rust: stable
2326
os: macos-latest
2427
- rust: stable
25-
os: actuated-arm64-4cpu-16gb
28+
os: ubuntu-22.04-arm
2629
runs-on: ${{ matrix.os }}
30+
continue-on-error: ${{ matrix.rust == 'beta' }}
2731
steps:
2832
- name: Free disk space
2933
if: ${{ matrix.os == 'ubuntu-latest'}}
@@ -73,38 +77,18 @@ jobs:
7377
- uses: actions/checkout@v4
7478
- uses: dtolnay/rust-toolchain@nightly
7579
with:
76-
toolchain: nightly-2024-05-01
80+
toolchain: nightly-2024-06-30
7781
components: rustfmt
7882
- name: external-type-check
7983
run: |
80-
cargo install cargo-check-external-types
84+
cargo install cargo-check-external-types@0.1.13
8185
cd ${{ matrix.example }}
8286
cargo check-external-types --config allowed-external-types.toml
83-
non-default-examples:
84-
strategy:
85-
matrix:
86-
os: [ windows-latest, ubuntu-latest ]
87-
example: [opentelemetry-otlp/examples/basic-otlp]
88-
runs-on: ${{ matrix.os }}
89-
steps:
90-
- uses: actions/checkout@v4
91-
with:
92-
submodules: true
93-
- uses: dtolnay/rust-toolchain@stable
94-
with:
95-
components: rustfmt
96-
- uses: arduino/setup-protoc@v3
97-
with:
98-
repo-token: ${{ secrets.GITHUB_TOKEN }}
99-
- name: Build
100-
run: |
101-
cd ${{ matrix.example }}
102-
cargo build --verbose
10387
msrv:
10488
strategy:
10589
matrix:
10690
os: [windows-latest, ubuntu-latest]
107-
rust: [1.70.0, 1.71.1]
91+
rust: [1.75.0]
10892
runs-on: ${{ matrix.os }}
10993
continue-on-error: true
11094
steps:
@@ -132,7 +116,7 @@ jobs:
132116
runs-on: ubuntu-latest
133117
steps:
134118
- uses: actions/checkout@v4
135-
- uses: dtolnay/rust-toolchain@nightly
119+
- uses: dtolnay/rust-toolchain@stable
136120
with:
137121
components: rustfmt
138122
- uses: arduino/setup-protoc@v3
@@ -164,7 +148,7 @@ jobs:
164148
if: hashFiles('Cargo.lock') == ''
165149
run: cargo generate-lockfile
166150
- name: cargo llvm-cov
167-
run: cargo llvm-cov --locked --all-features --workspace --lcov --output-path lcov.info
151+
run: cargo llvm-cov --locked --all-features --workspace --lcov --lib --output-path lcov.info
168152
- name: Upload to codecov.io
169153
uses: codecov/codecov-action@v4
170154
env:

.github/workflows/fossa.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: FOSSA scanning
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
fossa:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
17+
- uses: fossas/fossa-action@93a52ecf7c3ac7eb40f5de77fd69b1a19524de94 # v1.5.0
18+
with:
19+
api-key: ${{secrets.FOSSA_API_KEY}}
20+
team: OpenTelemetry

.github/workflows/integration_tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ jobs:
99
integration_tests:
1010
runs-on: ubuntu-latest
1111
timeout-minutes: 10
12-
if: ${{ github.event.label.name == 'integration tests' || contains(github.event.pull_request.labels.*.name, 'integration tests') }}
1312
steps:
1413
- name: Free disk space
1514
run: |
@@ -24,5 +23,5 @@ jobs:
2423
with:
2524
components: rustfmt
2625
- uses: arduino/setup-protoc@v3
27-
- name: Run integration tests using docker compose
26+
- name: Run integration tests
2827
run: ./scripts/integration_tests.sh
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
on: [pull_request]
2+
name: benchmark pull requests
3+
jobs:
4+
runBenchmark:
5+
name: run benchmark
6+
permissions:
7+
pull-requests: write
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: arduino/setup-protoc@v3
12+
- uses: dtolnay/rust-toolchain@master
13+
with:
14+
toolchain: stable
15+
- uses: boa-dev/criterion-compare-action@v3
16+
with:
17+
cwd: opentelemetry
18+
branchName: ${{ github.base_ref }}
19+
- uses: boa-dev/criterion-compare-action@v3
20+
with:
21+
cwd: opentelemetry-appender-tracing
22+
features: spec_unstable_logs_enabled
23+
branchName: ${{ github.base_ref }}
24+
- uses: boa-dev/criterion-compare-action@v3
25+
with:
26+
cwd: opentelemetry-sdk
27+
features: rt-tokio,testing,metrics,logs,spec_unstable_metrics_views
28+
branchName: ${{ github.base_ref }}

.github/workflows/pr_naming.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: PR Conventional Commit Validation
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened, edited]
6+
7+
jobs:
8+
validate-pr-title:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: PR Conventional Commit Validation
12+
uses: ytanikin/[email protected]
13+
with:
14+
task_types: '["build","chore","ci","docs","feat","fix","perf","refactor","revert","test"]'
15+
add_label: 'false'

.github/workflows/semver.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ env:
44
on:
55
pull_request:
66
types: [ labeled, synchronize, opened, reopened ]
7-
87
jobs:
98
semver-compliance: # This job uses the latest published crate as baseline for comparison.
109
runs-on: ubuntu-latest

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
55
Cargo.lock
66
/.idea/
77

8-
.cosine
8+
.cosine
9+
10+
opentelemetry-otlp/tests/integration_test/result.json

CONTRIBUTING.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,13 @@ Open a pull request against the main
7878
[opentelemetry-rust](https://github.com/open-telemetry/opentelemetry-rust)
7979
repo.
8080

81+
Your pull request should be named according to the
82+
[conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard. This ensures that
83+
when the PR is squashed into `main`, the resulting commit message is consistent and makes it easier
84+
for us to generate a changelog standard.
85+
8186
> **Note**
82-
> It is recommended to run [pre-commit script](scripts/precommit.sh) from the root of
83-
the repo to catch any issues locally.
87+
> It is recommended to run [pre-commit script](scripts/precommit.sh) to catch any issues locally.
8488
8589
### How to Receive Comments
8690

@@ -140,7 +144,7 @@ For a deeper discussion, see:
140144

141145
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.
142146

143-
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`.
147+
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::MetricError`. All errors returned by logs module MUST be wrapped in `opentelemetry::logs::LogsError`.
144148

145149
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.
146150

@@ -169,7 +173,7 @@ It's important to regularly review and remove the `otel_unstable` flag from the
169173
The potential features include:
170174

171175
- 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`).
172-
- 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`.
176+
- 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.
173177

174178
All such features should adhere to naming convention `<signal>_<feature_name>`
175179

Cargo.toml

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ members = [
88
"stress",
99
]
1010
resolver = "2"
11+
# Avoid applying patch to force use of workspace members for this
12+
# not actively maintained crate
13+
exclude = ["opentelemetry-prometheus"]
1114

1215
[profile.bench]
1316
# https://doc.rust-lang.org/cargo/reference/profiles.html#bench
@@ -29,22 +32,58 @@ hyper = { version = "1.3", default-features = false }
2932
hyper-util = "0.1"
3033
log = "0.4.21"
3134
once_cell = "1.13"
32-
ordered-float = "4.0"
3335
pin-project-lite = "0.2"
3436
prost = "0.13"
3537
prost-build = "0.13"
3638
prost-types = "0.13"
37-
rand = { version = "0.8", default-features = false }
39+
rand = { version = "0.9", default-features = false }
3840
reqwest = { version = "0.12", default-features = false }
3941
serde = { version = "1.0", default-features = false }
4042
serde_json = "1.0"
4143
temp-env = "0.3.6"
42-
thiserror = { version = "1", default-features = false }
44+
thiserror = { version = "2", default-features = false }
4345
tonic = { version = "0.12.3", default-features = false }
4446
tonic-build = { version = "0.12", default-features = false, features = ["prost", "transport"]}
4547
tokio = { version = "1", default-features = false }
4648
tokio-stream = "0.1"
47-
tracing = { version = "0.1", default-features = false }
48-
tracing-core = { version = "0.1", default-features = false }
49+
# Using `tracing 0.1.40` because 0.1.39 (which is yanked) introduces the ability to set event names in macros,
50+
# required for OpenTelemetry's internal logging macros.
51+
tracing = { version = ">=0.1.40", default-features = false }
52+
# `tracing-core >=0.1.33` is required for compatibility with `tracing >=0.1.40`.
53+
tracing-core = { version = ">=0.1.33", default-features = false }
4954
tracing-subscriber = { version = "0.3", default-features = false }
5055
url = { version = "2.5", default-features = false }
56+
anyhow = "1.0.94"
57+
base64 = "0.22.1"
58+
chrono = { version = "0.4.34", default-features = false }
59+
ctor = "0.2.9"
60+
ctrlc = "3.2.5"
61+
futures-channel = "0.3"
62+
futures-sink = "0.3"
63+
glob = "0.3.1"
64+
hex = "0.4.3"
65+
lazy_static = "1.4.0"
66+
num-format = "0.4.4"
67+
num_cpus = "1.15.0"
68+
opentelemetry-appender-tracing = { path = "opentelemetry-appender-tracing", default-features = false }
69+
opentelemetry-otlp = { path = "opentelemetry-otlp" }
70+
opentelemetry-stdout = { path = "opentelemetry-stdout" }
71+
percent-encoding = "2.0"
72+
rstest = "0.23.0"
73+
schemars = "0.8"
74+
sysinfo = "0.32"
75+
tempfile = "3.3.0"
76+
testcontainers = "0.23.1"
77+
tracing-log = "0.2"
78+
tracing-opentelemetry = "0.29"
79+
typed-builder = "0.20"
80+
uuid = "1.3"
81+
82+
# Aviod use of crates.io version of these crates through the tracing-opentelemetry dependencies
83+
[patch.crates-io]
84+
opentelemetry = { path = "opentelemetry" }
85+
opentelemetry_sdk = { path = "opentelemetry-sdk" }
86+
opentelemetry-stdout = { path = "opentelemetry-stdout" }
87+
88+
[workspace.lints.clippy]
89+
all = { level = "warn", priority = 1 }

0 commit comments

Comments
 (0)