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
59
60
61
62
63
64
65
66
67
68
//! Stdout client for debugging X-Ray segment documents.
//!
//! This module provides [`StdoutClient`], which prints segment documents to stdout
//! in pretty-formatted JSON. This is useful for debugging and development purposes.
//!
//! # Examples
//!
//! ```no_run
//! use opentelemetry_aws::xray_exporter::{XrayExporter, stdout_client::StdoutClient};
//!
//! let exporter = XrayExporter::new(StdoutClient);
//! ```
use Infallible;
use crateSegmentDocument;
use SegmentDocumentExporter;
/// A client that prints segment documents to stdout for debugging.
///
/// This client outputs each segment document as pretty-formatted JSON to stdout,
/// making it useful for development, testing, and debugging purposes. It does not
/// actually send data to AWS X-Ray.
///
/// # Examples
///
/// Basic usage:
///
/// ```no_run
/// use opentelemetry_aws::xray_exporter::{XrayExporter, stdout_client::StdoutClient};
/// use opentelemetry_sdk::trace::SdkTracerProvider;
///
/// let exporter = XrayExporter::new(StdoutClient);
///
/// let provider = SdkTracerProvider::builder()
/// .with_simple_exporter(exporter)
/// .build();
/// ```
///
/// The output will be formatted JSON like:
///
/// ```json
/// {
/// "name": "my-service",
/// "id": "0123456789abcdef",
/// "trace_id": "1-5f8a1234-abcdef0123456789abcdef01",
/// "start_time": 1602774000.123,
/// "end_time": 1602774000.456,
/// ...
/// }
/// ```
;