pub struct Segment {Show 15 fields
pub end_time: Option<Seconds>,
pub in_progress: bool,
pub parent_id: Option<SegmentId>,
pub fault: bool,
pub error: bool,
pub throttle: bool,
pub cause: Option<Cause>,
pub origin: Option<String>,
pub user: Option<String>,
pub resource_arn: Option<String>,
pub http: Option<Http>,
pub annotations: Option<HashMap<String, Annotation>>,
pub metadata: Option<HashMap<String, Value>>,
pub aws: Option<Aws>,
pub service: Option<Service>,
/* private fields */
}
Expand description
Description of an internal application operation which may be an extension of an external operation
Fields§
§end_time: Option<Seconds>
Number that is the time the segment was closed.
in_progress: bool
boolean, set to true instead of specifying an end_time to record that a segment is started, but is not complete. Send an in-progress segment when your application receives a request that will take a long time to serve, to trace the request receipt. When the response is sent, send the complete segment to overwrite the in-progress segment. Only send one complete segment, and one or zero in-progress segments, per request.
parent_id: Option<SegmentId>
A subsegment ID you specify if the request originated from an instrumented application. The X-Ray SDK adds the parent subsegment ID to the tracing header for downstream HTTP calls.
fault: bool
Indicates that a server error occurred (response status code was 5XX Server Error).
error: bool
Indicates that a client error occurred (response status code was 4XX Client Error).
throttle: bool
boolean indicating that a request was throttled (response status code was 429 Too Many Requests).
cause: Option<Cause>
error fields that indicate an error occurred and that include information about the exception that caused the error.
origin: Option<String>
The type of AWS resource running your application. todo: convert to enum (see aws docs for values) When multiple values are applicable to your application, use the one that is most specific. For example, a Multicontainer Docker Elastic Beanstalk environment runs your application on an Amazon ECS container, which in turn runs on an Amazon EC2 instance. In this case you would set the origin to AWS::ElasticBeanstalk::Environment as the environment is the parent of the other two resources.
user: Option<String>
A string that identifies the user who sent the request.
resource_arn: Option<String>
§http: Option<Http>
http objects with information about the original HTTP request.
annotations: Option<HashMap<String, Annotation>>
annotations object with key-value pairs that you want X-Ray to index for search.
metadata: Option<HashMap<String, Value>>
metadata object with any additional data that you want to store in the segment.
aws: Option<Aws>
aws object with information about the AWS resource on which your application served the request.
service: Option<Service>
An object with information about your application.