1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! `livetrace` is a Command Line Interface (CLI) tool for real-time tailing
//! of AWS CloudWatch Logs, specifically designed to capture and forward
//! OTLP (OpenTelemetry Protocol) traces and logs.
// Standard Library
use stdout;
use process;
// External Crates
use Result;
use ; // Added CommandFactory
use generate; // Added generate
// Workspace Crates (the library part of this crate)
// CliArgs and Commands are defined in src/cli.rs and re-exported from src/lib.rs
// run_livetrace is the main entry point in src/lib.rs
use ; // Added Commands
/// Main entry point for the `livetrace` binary.
///
/// This function performs the following steps:
/// 1. Parses command-line arguments using `clap`.
/// 2. Calls the `run_livetrace` function from the `livetrace` library crate,
/// passing the parsed arguments. This function contains the core application logic.
/// 3. If `run_livetrace` returns an error, it prints the error to `stderr`
/// and exits the process with a status code of 1.
/// 4. If `run_livetrace` completes successfully, the program exits with a status code of 0.
async