Skip to content

Commit 1712da7

Browse files
authored
Merge branch 'main' into feature/resource-get-ref
2 parents b21e15b + cff5728 commit 1712da7

File tree

32 files changed

+576
-64
lines changed

32 files changed

+576
-64
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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ 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"
8584
tracing-opentelemetry = "0.32"
8685
typed-builder = "0.20"

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/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 {

opentelemetry-appender-tracing/src/layer.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,10 @@ mod tests {
934934
fn force_flush(&self) -> OTelSdkResult {
935935
Ok(())
936936
}
937+
938+
fn shutdown_with_timeout(&self, _timeout: std::time::Duration) -> OTelSdkResult {
939+
Ok(())
940+
}
937941
}
938942

939943
#[cfg(feature = "spec_unstable_logs_enabled")]

opentelemetry-otlp/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## vNext
44

5+
- Add partial success response handling for OTLP exporters (traces, metrics, logs) per OTLP spec. Exporters now log warnings when the server returns partial success responses with rejected items and error messages. [#865](https://github.com/open-telemetry/opentelemetry-rust/issues/865)
56
- Refactor `internal-logs` feature in `opentelemetry-otlp` to reduce unnecessary dependencies[3191](https://github.com/open-telemetry/opentelemetry-rust/pull/3192)
67

78
## 0.31.0

0 commit comments

Comments
 (0)