Skip to content

Commit 7c08092

Browse files
authored
Merge branch 'main' into log-attributes-update
2 parents d67da9f + 68c9133 commit 7c08092

File tree

241 files changed

+13500
-7106
lines changed

Some content is hidden

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

241 files changed

+13500
-7106
lines changed

.cspell.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,30 @@
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",
@@ -52,18 +59,29 @@
5259
"OTELCOL",
5360
"OTLP",
5461
"periodicreader",
62+
"Pillai",
63+
"pprof",
64+
"prost",
5565
"protoc",
5666
"quantile",
5767
"Redelmeier",
5868
"reqwest",
69+
"rstest",
5970
"runtimes",
6071
"rustc",
72+
"rustls",
73+
"semconv",
74+
"serde",
6175
"shoppingcart",
6276
"struct",
6377
"Tescher",
78+
"testcontainers",
6479
"testresults",
80+
"thiserror",
6581
"tracerprovider",
82+
"Umesan",
6683
"updown",
84+
"Utkarsh",
6785
"Zhongyang",
6886
"zipkin"
6987
],

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- rust: stable
2626
os: macos-latest
2727
- rust: stable
28-
os: otel-linux-arm64
28+
os: ubuntu-22.04-arm
2929
runs-on: ${{ matrix.os }}
3030
continue-on-error: ${{ matrix.rust == 'beta' }}
3131
steps:

.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: 2 additions & 1 deletion
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,7 @@ jobs:
2423
with:
2524
components: rustfmt
2625
- uses: arduino/setup-protoc@v3
26+
with:
27+
repo-token: ${{ secrets.GITHUB_TOKEN }}
2728
- name: Run integration tests
2829
run: ./scripts/integration_tests.sh
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
if: ${{ contains(github.event.pull_request.labels.*.name, 'performance') }}
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: arduino/setup-protoc@v3
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
- uses: dtolnay/rust-toolchain@master
16+
with:
17+
toolchain: stable
18+
- uses: boa-dev/criterion-compare-action@v3
19+
with:
20+
cwd: opentelemetry
21+
branchName: ${{ github.base_ref }}
22+
- uses: boa-dev/criterion-compare-action@v3
23+
with:
24+
cwd: opentelemetry-appender-tracing
25+
features: spec_unstable_logs_enabled
26+
branchName: ${{ github.base_ref }}
27+
- uses: boa-dev/criterion-compare-action@v3
28+
with:
29+
cwd: opentelemetry-sdk
30+
features: rt-tokio,testing,metrics,logs,spec_unstable_metrics_views
31+
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'

CONTRIBUTING.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ for specific dates and for Zoom meeting links. "OTel Rust SIG" is the name of
88
meeting for this group.
99

1010
Meeting notes are available as a public [Google
11-
doc](https://docs.google.com/document/d/1tGKuCsSnyT2McDncVJrMgg74_z8V06riWZa0Sr79I_4/edit).
11+
doc](https://docs.google.com/document/d/12upOzNk8c3SFTjsL6IRohCWMgzLKoknSCOOdMakbWo4/edit).
1212
If you have trouble accessing the doc, please get in touch on
1313
[Slack](https://cloud-native.slack.com/archives/C03GDP0H023).
1414

@@ -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

Cargo.toml

Lines changed: 45 additions & 2 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,12 +32,11 @@ 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"
@@ -51,3 +53,44 @@ tracing = { version = ">=0.1.40", default-features = false }
5153
tracing-core = { version = ">=0.1.33", default-features = false }
5254
tracing-subscriber = { version = "0.3", default-features = false }
5355
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.rust]
89+
rust_2024_compatibility = { level = "warn", priority = -1 }
90+
# No need to enable those, because it either not needed or results in ugly syntax
91+
edition_2024_expr_fragment_specifier = "allow"
92+
if_let_rescope = "allow"
93+
tail_expr_drop_order = "allow"
94+
95+
[workspace.lints.clippy]
96+
all = { level = "warn", priority = 1 }

README.md

Lines changed: 24 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ documentation.
3030

3131
| Signal/Component | Overall Status |
3232
| -------------------- | ------------------ |
33-
| Logs-API | RC* |
34-
| Logs-SDK | Beta |
35-
| Logs-OTLP Exporter | Beta |
36-
| Logs-Appender-Tracing | Beta |
37-
| Metrics-API | RC |
38-
| Metrics-SDK | Beta |
39-
| Metrics-OTLP Exporter | Beta |
33+
| Logs-API | Stable* |
34+
| Logs-SDK | RC |
35+
| Logs-OTLP Exporter | RC |
36+
| Logs-Appender-Tracing | RC |
37+
| Metrics-API | Stable |
38+
| Metrics-SDK | RC |
39+
| Metrics-OTLP Exporter | RC |
4040
| Traces-API | Beta |
4141
| Traces-SDK | Beta |
4242
| Traces-OTLP Exporter | Beta |
@@ -55,49 +55,28 @@ If you already use the logging APIs from above, continue to use them, and use
5555
the appenders above to bridge the logs to OpenTelemetry. If you are using a
5656
library not listed here, feel free to contribute a new appender for the same.
5757

58-
If you are starting fresh, then consider using
58+
If you are starting fresh, we recommend using
5959
[tracing](https://github.com/tokio-rs/tracing) as your logging API. It supports
60-
structured logging and is actively maintained.
60+
structured logging and is actively maintained. `OpenTelemetry` itself uses
61+
`tracing` for its internal logging.
6162

6263
Project versioning information and stability guarantees can be found
6364
[here](VERSIONING.md).
6465

6566
## Getting Started
6667

67-
```rust
68-
use opentelemetry::{
69-
global,
70-
trace::{Tracer, TracerProvider as _},
71-
};
72-
use opentelemetry_sdk::trace::TracerProvider;
73-
74-
fn main() {
75-
// Create a new trace pipeline that prints to stdout
76-
let provider = TracerProvider::builder()
77-
.with_simple_exporter(opentelemetry_stdout::SpanExporter::default())
78-
.build();
79-
let tracer = provider.tracer("readme_example");
80-
81-
tracer.in_span("doing_work", |cx| {
82-
// Traced app logic here...
83-
});
84-
85-
// Shutdown trace pipeline
86-
provider.shutdown().expect("TracerProvider should shutdown successfully")
87-
}
88-
```
89-
90-
The example above requires the following packages:
91-
92-
```toml
93-
# Cargo.toml
94-
[dependencies]
95-
opentelemetry = "0.22"
96-
opentelemetry_sdk = "0.22"
97-
opentelemetry-stdout = { version = "0.3", features = ["trace"] }
98-
```
99-
100-
See the [examples](./examples) directory for different integration patterns.
68+
If you are new to OpenTelemetry, start with the [Stdout
69+
Example](./opentelemetry-stdout/examples/basic.rs). This example demonstrates
70+
how to use OpenTelemetry for logs, metrics, and traces, and display
71+
telemetry data on your console.
72+
73+
For those using OTLP, the recommended OpenTelemetry Exporter for production
74+
scenarios, refer to the [OTLP Example -
75+
HTTP](./opentelemetry-otlp/examples/basic-otlp-http/README.md) and the [OTLP
76+
Example - gRPC](./opentelemetry-otlp/examples/basic-otlp/README.md).
77+
78+
Additional examples for various integration patterns can be found in the
79+
[examples](./examples) directory.
10180

10281
## Overview of crates
10382

@@ -184,7 +163,7 @@ for specific dates and for Zoom meeting links. "OTel Rust SIG" is the name of
184163
meeting for this group.
185164

186165
Meeting notes are available as a public [Google
187-
doc](https://docs.google.com/document/d/1tGKuCsSnyT2McDncVJrMgg74_z8V06riWZa0Sr79I_4/edit).
166+
doc](https://docs.google.com/document/d/12upOzNk8c3SFTjsL6IRohCWMgzLKoknSCOOdMakbWo4/edit).
188167
If you have trouble accessing the doc, please get in touch on
189168
[Slack](https://cloud-native.slack.com/archives/C03GDP0H023).
190169

@@ -207,6 +186,7 @@ you're more than welcome to participate!
207186
### Approvers
208187

209188
* [Shaun Cox](https://github.com/shaun-cox)
189+
* [Scott Gerring](https://github.com/scottgerring)
210190

211191
### Emeritus
212192

0 commit comments

Comments
 (0)