Skip to content

feat: Support ordering LogEvent's #41

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

Merged
merged 2 commits into from
Nov 15, 2024
Merged

feat: Support ordering LogEvent's #41

merged 2 commits into from
Nov 15, 2024

Conversation

giantcow
Copy link
Contributor

Fixes #40

The tests aren't great, but they work

# kayo @ ClockTower in ~/workspace/tracing-cloudwatch on git:ordering x [19:08:06] 
$ cargo test
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.05s
     Running unittests src/lib.rs (target/debug/deps/tracing_cloudwatch-420ac1eb2f0a2867)

running 3 tests
test export::tests::does_not_order_logs_by_default ... ok
test layer::tests::format ... ok
test layer::tests::with_fmt_layer_json ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

   Doc-tests tracing_cloudwatch

running 2 tests
test src/lib.rs - (line 11) ... ignored
test src/lib.rs - (line 37) ... ignored

test result: ok. 0 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 0.00s


# kayo @ ClockTower in ~/workspace/tracing-cloudwatch on git:ordering x [19:09:09] 
$ cargo test --features ordered_logs
    Finished `test` profile [unoptimized + debuginfo] target(s) in 0.05s
     Running unittests src/lib.rs (target/debug/deps/tracing_cloudwatch-b9d2b1e831be7a41)

running 3 tests
test export::tests::ordering::orders_logs_when_enabled ... ok
test layer::tests::format ... ok
test layer::tests::with_fmt_layer_json ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s

   Doc-tests tracing_cloudwatch

running 2 tests
test src/lib.rs - (line 11) ... ignored
test src/lib.rs - (line 37) ... ignored

test result: ok. 0 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 0.00s

@ymgyt
Copy link
Owner

ymgyt commented Nov 15, 2024

Thank you for PR.
I'm planning to release it as version 0.3.0.

Since we format Cargo.toml with cargo-sort, please try running cargo sort.

@giantcow
Copy link
Contributor Author

Interesting.. I assume that CI check is new? the change after running sort isn't related to my change:

diff --git a/Cargo.toml b/Cargo.toml
index 2124886..51d21ba 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -35,6 +35,7 @@ tracing-subscriber = { version = "0.3", default-features = false, features = [
 
 [dev-dependencies]
 aws-config = "1"
+insta = "1.40.0"
 tokio = { version = "1.28.0", features = [
   "rt",
   "rt-multi-thread",
@@ -43,4 +44,3 @@ tokio = { version = "1.28.0", features = [
 ] }
 tracing = "0.1.37"
 tracing-subscriber = { version = "0.3.17", features = ["json"] }
-insta = "1.40.0"

@ymgyt
Copy link
Owner

ymgyt commented Nov 15, 2024

I'm sorry for asking you to make changes in areas unrelated to PR

@giantcow
Copy link
Contributor Author

That's okay! No worries

@ymgyt ymgyt merged commit 1ff9af1 into ymgyt:main Nov 15, 2024
1 check passed
@giantcow giantcow deleted the ordering branch November 15, 2024 03:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PutLogEvents request must be in chronological order
2 participants