-
Notifications
You must be signed in to change notification settings - Fork 532
Replace unmaintained actions-rs/toolchain action. #1655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a05fa4d
12bedb1
159dcd1
16e9535
b995910
8e4446a
5741823
441ebd3
c71c2e9
2e5a33a
a024f03
0fd0802
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,11 +24,12 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
components: rustfmt | ||
profile: minimal | ||
- name: "Set rustup profile" | ||
run: rustup set profile minimal | ||
- uses: arduino/setup-protoc@v3 | ||
- name: Test | ||
run: ./scripts/test.sh | ||
|
@@ -38,11 +39,9 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
components: rustfmt | ||
profile: minimal | ||
- uses: arduino/setup-protoc@v3 | ||
- uses: actions-rs/cargo@v1 | ||
lalitb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
with: | ||
|
@@ -57,11 +56,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
toolchain: nightly-2024-02-07 | ||
components: rustfmt | ||
override: true | ||
- name: external-type-check | ||
run: | | ||
cargo install cargo-check-external-types | ||
|
@@ -76,11 +73,9 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
components: rustfmt | ||
profile: minimal | ||
- uses: arduino/setup-protoc@v3 | ||
- name: Build | ||
run: | | ||
|
@@ -92,11 +87,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: 1.65.0 | ||
override: true | ||
- uses: dtolnay/[email protected] | ||
- name: Patch dependencies versions # some dependencies bump MSRV without major version bump | ||
run: ./scripts/patch_dependencies.sh | ||
- name: Run tests | ||
|
@@ -117,11 +108,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
toolchain: nightly | ||
components: rustfmt | ||
override: true | ||
- uses: arduino/setup-protoc@v3 | ||
- name: doc | ||
run: cargo doc --no-deps --all-features | ||
|
@@ -136,11 +125,10 @@ jobs: | |
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
components: rustfmt,llvm-tools-preview | ||
override: true | ||
- uses: arduino/setup-protoc@v3 | ||
- name: cargo install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -1,39 +1,10 @@ | ||||
use opentelemetry_appender_tracing::layer; | ||||
use opentelemetry_sdk::logs::{LogProcessor, LoggerProvider}; | ||||
use tracing::error; | ||||
use tracing_subscriber::{prelude::*, Layer}; | ||||
use tracing_subscriber::prelude::*; | ||||
|
||||
mod throughput; | ||||
|
||||
struct NoopEventVisitor; | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. NoOpLogLayer and NoopEventVisitor are not used, so removing them, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we not need them for the future? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see them used for stress test. We already have the benchmark test for them here -
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can probably revive them if needed |
||||
|
||||
impl tracing::field::Visit for NoopEventVisitor { | ||||
fn record_debug(&mut self, _field: &tracing::field::Field, _value: &dyn std::fmt::Debug) {} | ||||
} | ||||
|
||||
struct NoOpLogLayer; | ||||
impl<S> Layer<S> for NoOpLogLayer | ||||
where | ||||
S: tracing::Subscriber, | ||||
{ | ||||
fn on_event( | ||||
&self, | ||||
event: &tracing::Event<'_>, | ||||
_ctx: tracing_subscriber::layer::Context<'_, S>, | ||||
) { | ||||
let mut visitor = NoopEventVisitor; | ||||
event.record(&mut visitor); | ||||
} | ||||
|
||||
fn event_enabled( | ||||
&self, | ||||
_event: &tracing::Event<'_>, | ||||
_ctx: tracing_subscriber::layer::Context<'_, S>, | ||||
) -> bool { | ||||
true | ||||
} | ||||
} | ||||
|
||||
#[derive(Debug)] | ||||
pub struct NoOpLogProcessor; | ||||
|
||||
|
@@ -67,12 +38,6 @@ fn main() { | |||
// Use the OpenTelemetryTracingBridge to test the throughput of the appender-tracing. | ||||
let layer = layer::OpenTelemetryTracingBridge::new(&provider); | ||||
tracing_subscriber::registry().with(layer).init(); | ||||
|
||||
// Use a "Do-Nothing" layer to test the throughput of the tracing system without | ||||
// OpenTelemetry overhead. This helps measure the OpenTelemetry overhead. | ||||
// let noop_layer = NoOpLogLayer; | ||||
// tracing_subscriber::registry().with(noop_layer).init(); | ||||
|
||||
throughput::test_throughput(test_log); | ||||
} | ||||
|
||||
|
Uh oh!
There was an error while loading. Please reload this page.