#[non_exhaustive]pub struct TraceSummary {Show 21 fields
pub id: Option<String>,
pub start_time: Option<DateTime>,
pub duration: Option<f64>,
pub response_time: Option<f64>,
pub has_fault: Option<bool>,
pub has_error: Option<bool>,
pub has_throttle: Option<bool>,
pub is_partial: Option<bool>,
pub http: Option<Http>,
pub annotations: Option<HashMap<String, Vec<ValueWithServiceIds>>>,
pub users: Option<Vec<TraceUser>>,
pub service_ids: Option<Vec<ServiceId>>,
pub resource_arns: Option<Vec<ResourceArnDetail>>,
pub instance_ids: Option<Vec<InstanceIdDetail>>,
pub availability_zones: Option<Vec<AvailabilityZoneDetail>>,
pub entry_point: Option<ServiceId>,
pub fault_root_causes: Option<Vec<FaultRootCause>>,
pub error_root_causes: Option<Vec<ErrorRootCause>>,
pub response_time_root_causes: Option<Vec<ResponseTimeRootCause>>,
pub revision: i32,
pub matched_event_time: Option<DateTime>,
}
Expand description
Metadata generated from the segment documents in a trace.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.id: Option<String>
The unique identifier for the request that generated the trace's segments and subsegments.
start_time: Option<DateTime>
The start time of a trace, based on the earliest trace segment start time.
duration: Option<f64>
The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.
response_time: Option<f64>
The length of time in seconds between the start and end times of the root segment. If the service performs work asynchronously, the response time measures the time before the response is sent to the user, while the duration measures the amount of time before the last traced activity completes.
has_fault: Option<bool>
The root segment document has a 500 series error.
has_error: Option<bool>
The root segment document has a 400 series error.
has_throttle: Option<bool>
One or more of the segment documents has a 429 throttling error.
is_partial: Option<bool>
One or more of the segment documents is in progress.
http: Option<Http>
Information about the HTTP request served by the trace.
annotations: Option<HashMap<String, Vec<ValueWithServiceIds>>>
Annotations from the trace's segment documents.
users: Option<Vec<TraceUser>>
Users from the trace's segment documents.
service_ids: Option<Vec<ServiceId>>
Service IDs from the trace's segment documents.
resource_arns: Option<Vec<ResourceArnDetail>>
A list of resource ARNs for any resource corresponding to the trace segments.
instance_ids: Option<Vec<InstanceIdDetail>>
A list of EC2 instance IDs for any instance corresponding to the trace segments.
availability_zones: Option<Vec<AvailabilityZoneDetail>>
A list of Availability Zones for any zone corresponding to the trace segments.
entry_point: Option<ServiceId>
The root of a trace.
fault_root_causes: Option<Vec<FaultRootCause>>
A collection of FaultRootCause structures corresponding to the trace segments.
error_root_causes: Option<Vec<ErrorRootCause>>
A collection of ErrorRootCause structures corresponding to the trace segments.
response_time_root_causes: Option<Vec<ResponseTimeRootCause>>
A collection of ResponseTimeRootCause structures corresponding to the trace segments.
revision: i32
The revision number of a trace.
matched_event_time: Option<DateTime>
The matched time stamp of a defined event.
Implementations§
Source§impl TraceSummary
impl TraceSummary
Sourcepub fn id(&self) -> Option<&str>
pub fn id(&self) -> Option<&str>
The unique identifier for the request that generated the trace's segments and subsegments.
Sourcepub fn start_time(&self) -> Option<&DateTime>
pub fn start_time(&self) -> Option<&DateTime>
The start time of a trace, based on the earliest trace segment start time.
Sourcepub fn duration(&self) -> Option<f64>
pub fn duration(&self) -> Option<f64>
The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.
Sourcepub fn response_time(&self) -> Option<f64>
pub fn response_time(&self) -> Option<f64>
The length of time in seconds between the start and end times of the root segment. If the service performs work asynchronously, the response time measures the time before the response is sent to the user, while the duration measures the amount of time before the last traced activity completes.
Sourcepub fn has_throttle(&self) -> Option<bool>
pub fn has_throttle(&self) -> Option<bool>
One or more of the segment documents has a 429 throttling error.
Sourcepub fn is_partial(&self) -> Option<bool>
pub fn is_partial(&self) -> Option<bool>
One or more of the segment documents is in progress.
Sourcepub fn annotations(&self) -> Option<&HashMap<String, Vec<ValueWithServiceIds>>>
pub fn annotations(&self) -> Option<&HashMap<String, Vec<ValueWithServiceIds>>>
Annotations from the trace's segment documents.
Sourcepub fn users(&self) -> &[TraceUser]
pub fn users(&self) -> &[TraceUser]
Users from the trace's segment documents.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .users.is_none()
.
Sourcepub fn service_ids(&self) -> &[ServiceId]
pub fn service_ids(&self) -> &[ServiceId]
Service IDs from the trace's segment documents.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .service_ids.is_none()
.
Sourcepub fn resource_arns(&self) -> &[ResourceArnDetail]
pub fn resource_arns(&self) -> &[ResourceArnDetail]
A list of resource ARNs for any resource corresponding to the trace segments.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .resource_arns.is_none()
.
Sourcepub fn instance_ids(&self) -> &[InstanceIdDetail]
pub fn instance_ids(&self) -> &[InstanceIdDetail]
A list of EC2 instance IDs for any instance corresponding to the trace segments.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .instance_ids.is_none()
.
Sourcepub fn availability_zones(&self) -> &[AvailabilityZoneDetail]
pub fn availability_zones(&self) -> &[AvailabilityZoneDetail]
A list of Availability Zones for any zone corresponding to the trace segments.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .availability_zones.is_none()
.
Sourcepub fn entry_point(&self) -> Option<&ServiceId>
pub fn entry_point(&self) -> Option<&ServiceId>
The root of a trace.
Sourcepub fn fault_root_causes(&self) -> &[FaultRootCause]
pub fn fault_root_causes(&self) -> &[FaultRootCause]
A collection of FaultRootCause structures corresponding to the trace segments.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .fault_root_causes.is_none()
.
Sourcepub fn error_root_causes(&self) -> &[ErrorRootCause]
pub fn error_root_causes(&self) -> &[ErrorRootCause]
A collection of ErrorRootCause structures corresponding to the trace segments.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .error_root_causes.is_none()
.
Sourcepub fn response_time_root_causes(&self) -> &[ResponseTimeRootCause]
pub fn response_time_root_causes(&self) -> &[ResponseTimeRootCause]
A collection of ResponseTimeRootCause structures corresponding to the trace segments.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .response_time_root_causes.is_none()
.
Sourcepub fn matched_event_time(&self) -> Option<&DateTime>
pub fn matched_event_time(&self) -> Option<&DateTime>
The matched time stamp of a defined event.
Source§impl TraceSummary
impl TraceSummary
Sourcepub fn builder() -> TraceSummaryBuilder
pub fn builder() -> TraceSummaryBuilder
Creates a new builder-style object to manufacture TraceSummary
.
Trait Implementations§
Source§impl Clone for TraceSummary
impl Clone for TraceSummary
Source§fn clone(&self) -> TraceSummary
fn clone(&self) -> TraceSummary
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for TraceSummary
impl Debug for TraceSummary
Source§impl PartialEq for TraceSummary
impl PartialEq for TraceSummary
impl StructuralPartialEq for TraceSummary
Auto Trait Implementations§
impl Freeze for TraceSummary
impl RefUnwindSafe for TraceSummary
impl Send for TraceSummary
impl Sync for TraceSummary
impl Unpin for TraceSummary
impl UnwindSafe for TraceSummary
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.bright_black());
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.bright_green());
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.bright_yellow());
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.bright_magenta());
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Returns self
with the
fg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.bright_white());
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlack
.
§Example
println!("{}", value.on_bright_black());
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightGreen
.
§Example
println!("{}", value.on_bright_green());
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightYellow
.
§Example
println!("{}", value.on_bright_yellow());
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightBlue
.
§Example
println!("{}", value.on_bright_blue());
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightMagenta
.
§Example
println!("{}", value.on_bright_magenta());
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightCyan
.
§Example
println!("{}", value.on_bright_cyan());
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Returns self
with the
bg()
set to
Color::BrightWhite
.
§Example
println!("{}", value.on_bright_white());
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn underline(&self) -> Painted<&T>
fn underline(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::Underline
.
§Example
println!("{}", value.underline());
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Returns self
with the
attr()
set to
Attribute::RapidBlink
.
§Example
println!("{}", value.rapid_blink());
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);