Skip to content

Commit b0475dc

Browse files
authored
Merge branch 'main' into chore/otlp-retry-postreview-cleanup
2 parents e7c40bd + 5c8dbc8 commit b0475dc

File tree

38 files changed

+620
-307
lines changed

38 files changed

+620
-307
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
with:
6666
toolchain: stable
6767
components: rustfmt, clippy
68-
- uses: taiki-e/install-action@d6d752794628f1e1fffa3c4d3c8874e06f043d50 # v2.62.15
68+
- uses: taiki-e/install-action@47be02f2de8a32619316956f6117e150bdc6763f # v2.62.44
6969
with:
7070
tool: cargo-hack
7171
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
@@ -93,7 +93,7 @@ jobs:
9393
# https://github.com/awslabs/cargo-check-external-types/releases
9494
toolchain: nightly-2025-05-04
9595
components: rustfmt
96-
- uses: taiki-e/install-action@d6d752794628f1e1fffa3c4d3c8874e06f043d50 # v2.62.15
96+
- uses: taiki-e/install-action@47be02f2de8a32619316956f6117e150bdc6763f # v2.62.44
9797
with:
9898
9999
- name: external-type-check
@@ -117,7 +117,7 @@ jobs:
117117
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
118118
with:
119119
toolchain: stable
120-
- uses: taiki-e/install-action@d6d752794628f1e1fffa3c4d3c8874e06f043d50 # v2.62.15
120+
- uses: taiki-e/install-action@47be02f2de8a32619316956f6117e150bdc6763f # v2.62.44
121121
with:
122122
tool: cargo-msrv
123123
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
@@ -199,7 +199,7 @@ jobs:
199199
with:
200200
repo-token: ${{ secrets.GITHUB_TOKEN }}
201201
- name: Install cargo-llvm-cov
202-
uses: taiki-e/install-action@d6d752794628f1e1fffa3c4d3c8874e06f043d50 # v2.62.15
202+
uses: taiki-e/install-action@47be02f2de8a32619316956f6117e150bdc6763f # v2.62.44
203203
with:
204204
tool: cargo-llvm-cov
205205
- name: cargo generate-lockfile
@@ -247,7 +247,7 @@ jobs:
247247
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
248248
with:
249249
toolchain: stable
250-
- uses: taiki-e/install-action@d6d752794628f1e1fffa3c4d3c8874e06f043d50 # v2.62.15
250+
- uses: taiki-e/install-action@47be02f2de8a32619316956f6117e150bdc6763f # v2.62.44
251251
with:
252252
tool: cargo-machete
253253
- name: cargo machete

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ jobs:
3434
submodules: true
3535

3636
- name: Initialize CodeQL
37-
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
37+
uses: github/codeql-action/init@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
3838
with:
3939
languages: rust
4040

4141
- name: Autobuild
42-
uses: github/codeql-action/autobuild@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
42+
uses: github/codeql-action/autobuild@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
4343

4444
- name: Perform CodeQL Analysis
45-
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
45+
uses: github/codeql-action/analyze@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2

.github/workflows/ossf-scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
# uploads of run results in SARIF format to the repository Actions tab.
4040
# https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
4141
- name: "Upload artifact"
42-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
42+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
4343
with:
4444
name: SARIF file
4545
path: results.sarif
@@ -48,6 +48,6 @@ jobs:
4848
# Upload the results to GitHub's code scanning dashboard (optional).
4949
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
5050
- name: "Upload to code-scanning"
51-
uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
51+
uses: github/codeql-action/upload-sarif@0499de31b99561a6d14a36a5f662c2a54f91beee # v4.31.2
5252
with:
5353
sarif_file: results.sarif

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,7 @@ rstest = "0.23.0"
8080
schemars = "0.8"
8181
sysinfo = "0.32"
8282
tempfile = "3.3.0"
83-
testcontainers = "0.23.1"
8483
tracing-log = "0.2"
85-
tracing-opentelemetry = "0.32"
8684
typed-builder = "0.20"
8785
uuid = "1.3"
8886
pprof = { version = "0.14", features = ["flamegraph", "criterion"] }

examples/tracing-http-propagator/src/server.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,10 @@ impl LogProcessor for EnrichWithBaggageLogProcessor {
121121
fn force_flush(&self) -> OTelSdkResult {
122122
Ok(())
123123
}
124+
125+
fn shutdown_with_timeout(&self, _timeout: Duration) -> OTelSdkResult {
126+
Ok(())
127+
}
124128
}
125129

126130
/// A custom span processor that enriches spans with baggage attributes. Baggage

opentelemetry-appender-log/examples/logs-basic.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
//! run with `$ cargo run --example logs-basic`
22
3-
/// This example shows how to use in_memory_exporter for logs. This uses opentelemetry-appender-log crate, which is a
4-
/// [logging appender](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/glossary.md#log-appender--bridge) that bridges logs from the [log crate](https://docs.rs/log/latest/log/) to OpenTelemetry.
5-
/// The example setups a LoggerProvider with a in-memory exporter, so emitted logs are stored in memory.
3+
/// This example shows how to use stdout exporter for logs. This uses
4+
/// opentelemetry-appender-log crate, which is a [logging
5+
/// appender](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/glossary.md#log-appender--bridge)
6+
/// that bridges logs from the [log crate](https://docs.rs/log/latest/log/) to
7+
/// OpenTelemetry. The example setups a LoggerProvider with a stdout exporter,
8+
/// so emitted logs are written to stdout.
69
///
710
use log::{error, info, warn, Level};
811
use opentelemetry_appender_log::OpenTelemetryLogBridge;
9-
use opentelemetry_sdk::logs::{BatchLogProcessor, SdkLoggerProvider};
12+
use opentelemetry_sdk::{logs::SdkLoggerProvider, Resource};
1013
use opentelemetry_stdout::LogExporter;
1114

1215
#[tokio::main]
@@ -15,7 +18,12 @@ async fn main() {
1518
let exporter = LogExporter::default();
1619
//Create a LoggerProvider and register the exporter
1720
let logger_provider = SdkLoggerProvider::builder()
18-
.with_log_processor(BatchLogProcessor::builder(exporter).build())
21+
.with_resource(
22+
Resource::builder()
23+
.with_service_name("log-appender-log-example")
24+
.build(),
25+
)
26+
.with_simple_exporter(exporter)
1927
.build();
2028

2129
// Setup Log Appender for the log crate.

opentelemetry-appender-tracing/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
## vNext
44

5+
- Remove the `experimental_use_tracing_span_context` since
6+
`tracing-opentelemetry` now supports [activating][31901] the OpenTelemetry
7+
context for the current tracing span.
8+
9+
This fixes [3190][3190] the circular dependency introduced by depending on
10+
`tracing-opentelemetry` that depends on `opentelemetry`.
11+
12+
[3190]: https://github.com/open-telemetry/opentelemetry-rust/issues/3190
13+
[31901]: https://github.com/tokio-rs/tracing-opentelemetry/blob/884b00cf438557733bd9cef9456281bea8c4bea1/src/layer.rs#L842
14+
515
## 0.31.1
616

717
Released 2025-Oct-1

opentelemetry-appender-tracing/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ tracing = { workspace = true, features = ["std"]}
1818
tracing-core = { workspace = true }
1919
tracing-log = { workspace = true, optional = true }
2020
tracing-subscriber = { workspace = true, features = ["registry", "std"] }
21-
tracing-opentelemetry = { workspace = true, optional = true }
2221

2322
[dev-dependencies]
2423
log = { workspace = true }
@@ -28,7 +27,6 @@ tracing = { workspace = true, features = ["std"]}
2827
tracing-subscriber = { workspace = true, features = ["env-filter","registry", "std", "fmt"] }
2928
tracing-log = { workspace = true }
3029
criterion = { workspace = true }
31-
#tokio = { workspace = true, features = ["full"]}
3230

3331
[target.'cfg(not(target_os = "windows"))'.dev-dependencies]
3432
pprof = { workspace = true }
@@ -37,10 +35,8 @@ pprof = { workspace = true }
3735
default = []
3836
experimental_metadata_attributes = ["dep:tracing-log"]
3937
spec_unstable_logs_enabled = ["opentelemetry/spec_unstable_logs_enabled"]
40-
experimental_use_tracing_span_context = ["tracing-opentelemetry"]
4138
bench_profiling = []
4239

43-
4440
[[bench]]
4541
name = "logs"
4642
harness = false

opentelemetry-appender-tracing/benches/log-attributes.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ impl LogProcessor for NoopProcessor {
4343
fn force_flush(&self) -> OTelSdkResult {
4444
Ok(())
4545
}
46+
47+
fn shutdown_with_timeout(&self, _timeout: std::time::Duration) -> OTelSdkResult {
48+
Ok(())
49+
}
4650
}
4751

4852
/// Creates a single benchmark for a specific number of attributes

opentelemetry-appender-tracing/benches/logs.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ impl LogProcessor for NoopProcessor {
6262
) -> bool {
6363
self.enabled
6464
}
65+
66+
fn shutdown_with_timeout(&self, _timeout: std::time::Duration) -> OTelSdkResult {
67+
Ok(())
68+
}
6569
}
6670

6771
struct NoOpLogLayer {

0 commit comments

Comments
 (0)