-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
In my use case, I'm combining my own logs from tracing, with logs from tracing-gstreamer. With the Gstreamer tracing logs enabled, I sometimes get the following error:
[tracing-cloudwatch] Unable to put logs to cloudwatch. Error: Other(InvalidParameterException: Log events in a single PutLogEvents request must be in chronological order.
Caused by:
InvalidParameterException: Log events in a single PutLogEvents request must be in chronological order.
Stack backtrace:
0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
1: tracing_cloudwatch::client::awssdk::<impl tracing_cloudwatch::client::CloudWatchClient for aws_sdk_cloudwatchlogs::client::Client>::put_logs::{{closure}}
2: tracing_cloudwatch::export::BatchExporter<C>::run::{{closure}}
3: tokio::runtime::task::core::Core<T,S>::poll
4: tokio::runtime::task::harness::Harness<T,S>::poll
5: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
6: tokio::runtime::scheduler::multi_thread::worker::Context::run
7: tokio::runtime::context::runtime::enter_runtime
8: tokio::runtime::scheduler::multi_thread::worker::run
9: tokio::runtime::task::core::Core<T,S>::poll
10: tokio::runtime::task::harness::Harness<T,S>::poll
11: tokio::runtime::blocking::pool::Inner::run
12: std::sys::backtrace::__rust_begin_short_backtrace
13: core::ops::function::FnOnce::call_once{{vtable.shim}}
14: std::sys::pal::unix::thread::Thread::new::thread_start
15: start_thread
16: clone3) LogDestination { log_group_name: "<snip>", log_stream_name: "<snip>" }
I think we could easily add a sort, but I'm very worried about the efficiency implications
tracing-cloudwatch/src/export.rs
Lines 136 to 138 in 437a5c8
let logs = std::mem::take(&mut queue); | |
if let Err(err) = client.put_logs(config.destination.clone(), logs).await { |
ymgyt
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working