XRay

Table of Contents

Client

class XRay.Client

A low-level client representing AWS X-Ray

Amazon Web Services X-Ray provides APIs for managing debug traces and retrieving service maps and other data created by processing those traces.

import boto3

client = boto3.client('xray')

These are the available methods:

batch_get_traces(**kwargs)

Retrieves a list of traces specified by ID. Each trace is a collection of segment documents that originates from a single request. Use GetTraceSummaries to get a list of trace IDs.

See also: AWS API Documentation

Request Syntax

response = client.batch_get_traces(
    TraceIds=[
        'string',
    ],
    NextToken='string'
)
Parameters
  • TraceIds (list) --

    [REQUIRED]

    Specify the trace IDs of requests for which to retrieve segments.

    • (string) --
  • NextToken (string) -- Pagination token.
Return type

dict

Returns

Response Syntax

{
    'Traces': [
        {
            'Id': 'string',
            'Duration': 123.0,
            'LimitExceeded': True|False,
            'Segments': [
                {
                    'Id': 'string',
                    'Document': 'string'
                },
            ]
        },
    ],
    'UnprocessedTraceIds': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Traces (list) --

      Full traces for the specified requests.

      • (dict) --

        A collection of segment documents with matching trace IDs.

        • Id (string) --

          The unique identifier for the request that generated the trace's segments and subsegments.

        • Duration (float) --

          The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.

        • LimitExceeded (boolean) --

          LimitExceeded is set to true when the trace has exceeded one of the defined quotas. For more information about quotas, see Amazon Web Services X-Ray endpoints and quotas .

        • Segments (list) --

          Segment documents for the segments and subsegments that comprise the trace.

          • (dict) --

            A segment from a trace that has been ingested by the X-Ray service. The segment can be compiled from documents uploaded with PutTraceSegments , or an inferred segment for a downstream service, generated from a subsegment sent by the service that called it.

            For the full segment document schema, see Amazon Web Services X-Ray Segment Documents in the Amazon Web Services X-Ray Developer Guide .

            • Id (string) --

              The segment's ID.

            • Document (string) --

              The segment document.

    • UnprocessedTraceIds (list) --

      Trace IDs of requests that haven't been processed.

      • (string) --
    • NextToken (string) --

      Pagination token.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
create_group(**kwargs)

Creates a group resource with a name and a filter expression.

See also: AWS API Documentation

Request Syntax

response = client.create_group(
    GroupName='string',
    FilterExpression='string',
    InsightsConfiguration={
        'InsightsEnabled': True|False,
        'NotificationsEnabled': True|False
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • GroupName (string) --

    [REQUIRED]

    The case-sensitive name of the new group. Default is a reserved name and names must be unique.

  • FilterExpression (string) -- The filter expression defining criteria by which to group traces.
  • InsightsConfiguration (dict) --

    The structure containing configurations related to insights.

    • The InsightsEnabled boolean can be set to true to enable insights for the new group or false to disable insights for the new group.
    • The NotifcationsEnabled boolean can be set to true to enable insights notifications for the new group. Notifications may only be enabled on a group with InsightsEnabled set to true.
    • InsightsEnabled (boolean) --

      Set the InsightsEnabled value to true to enable insights or false to disable insights.

    • NotificationsEnabled (boolean) --

      Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.

  • Tags (list) --

    A map that contains one or more tag keys and tag values to attach to an X-Ray group. For more information about ways to use tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference .

    The following restrictions apply to tags:

    • Maximum number of user-applied tags per resource: 50
    • Maximum tag key length: 128 Unicode characters
    • Maximum tag value length: 256 Unicode characters
    • Valid values for key and value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and @
    • Tag keys and values are case sensitive.
    • Don't use aws: as a prefix for keys; it's reserved for Amazon Web Services use.
    • (dict) --

      A map that contains tag keys and tag values to attach to an Amazon Web Services X-Ray group or sampling rule. For more information about ways to use tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference .

      The following restrictions apply to tags:

      • Maximum number of user-applied tags per resource: 50
      • Tag keys and values are case sensitive.
      • Don't use aws: as a prefix for keys; it's reserved for Amazon Web Services use. You cannot edit or delete system tags.
      • Key (string) -- [REQUIRED]

        A tag key, such as Stage or Name . A tag key cannot be empty. The key can be a maximum of 128 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

      • Value (string) -- [REQUIRED]

        An optional tag value, such as Production or test-only . The value can be a maximum of 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

Return type

dict

Returns

Response Syntax

{
    'Group': {
        'GroupName': 'string',
        'GroupARN': 'string',
        'FilterExpression': 'string',
        'InsightsConfiguration': {
            'InsightsEnabled': True|False,
            'NotificationsEnabled': True|False
        }
    }
}

Response Structure

  • (dict) --

    • Group (dict) --

      The group that was created. Contains the name of the group that was created, the Amazon Resource Name (ARN) of the group that was generated based on the group name, the filter expression, and the insight configuration that was assigned to the group.

      • GroupName (string) --

        The unique case-sensitive name of the group.

      • GroupARN (string) --

        The Amazon Resource Name (ARN) of the group generated based on the GroupName.

      • FilterExpression (string) --

        The filter expression defining the parameters to include traces.

      • InsightsConfiguration (dict) --

        The structure containing configurations related to insights.

        • The InsightsEnabled boolean can be set to true to enable insights for the group or false to disable insights for the group.
        • The NotificationsEnabled boolean can be set to true to enable insights notifications through Amazon EventBridge for the group.
        • InsightsEnabled (boolean) --

          Set the InsightsEnabled value to true to enable insights or false to disable insights.

        • NotificationsEnabled (boolean) --

          Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
create_sampling_rule(**kwargs)

Creates a rule to control sampling behavior for instrumented applications. Services retrieve rules with GetSamplingRules , and evaluate each rule in ascending order of priority for each request. If a rule matches, the service records a trace, borrowing it from the reservoir size. After 10 seconds, the service reports back to X-Ray with GetSamplingTargets to get updated versions of each in-use rule. The updated rule contains a trace quota that the service can use instead of borrowing from the reservoir.

See also: AWS API Documentation

Request Syntax

response = client.create_sampling_rule(
    SamplingRule={
        'RuleName': 'string',
        'RuleARN': 'string',
        'ResourceARN': 'string',
        'Priority': 123,
        'FixedRate': 123.0,
        'ReservoirSize': 123,
        'ServiceName': 'string',
        'ServiceType': 'string',
        'Host': 'string',
        'HTTPMethod': 'string',
        'URLPath': 'string',
        'Version': 123,
        'Attributes': {
            'string': 'string'
        }
    },
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • SamplingRule (dict) --

    [REQUIRED]

    The rule definition.

    • RuleName (string) --

      The name of the sampling rule. Specify a rule by either name or ARN, but not both.

    • RuleARN (string) --

      The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.

    • ResourceARN (string) -- [REQUIRED]

      Matches the ARN of the Amazon Web Services resource on which the service runs.

    • Priority (integer) -- [REQUIRED]

      The priority of the sampling rule.

    • FixedRate (float) -- [REQUIRED]

      The percentage of matching requests to instrument, after the reservoir is exhausted.

    • ReservoirSize (integer) -- [REQUIRED]

      A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.

    • ServiceName (string) -- [REQUIRED]

      Matches the name that the service uses to identify itself in segments.

    • ServiceType (string) -- [REQUIRED]

      Matches the origin that the service uses to identify its type in segments.

    • Host (string) -- [REQUIRED]

      Matches the hostname from a request URL.

    • HTTPMethod (string) -- [REQUIRED]

      Matches the HTTP method of a request.

    • URLPath (string) -- [REQUIRED]

      Matches the path from a request URL.

    • Version (integer) -- [REQUIRED]

      The version of the sampling rule format (1 ).

    • Attributes (dict) --

      Matches attributes derived from the request.

      • (string) --
        • (string) --
  • Tags (list) --

    A map that contains one or more tag keys and tag values to attach to an X-Ray sampling rule. For more information about ways to use tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference .

    The following restrictions apply to tags:

    • Maximum number of user-applied tags per resource: 50
    • Maximum tag key length: 128 Unicode characters
    • Maximum tag value length: 256 Unicode characters
    • Valid values for key and value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and @
    • Tag keys and values are case sensitive.
    • Don't use aws: as a prefix for keys; it's reserved for Amazon Web Services use.
    • (dict) --

      A map that contains tag keys and tag values to attach to an Amazon Web Services X-Ray group or sampling rule. For more information about ways to use tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference .

      The following restrictions apply to tags:

      • Maximum number of user-applied tags per resource: 50
      • Tag keys and values are case sensitive.
      • Don't use aws: as a prefix for keys; it's reserved for Amazon Web Services use. You cannot edit or delete system tags.
      • Key (string) -- [REQUIRED]

        A tag key, such as Stage or Name . A tag key cannot be empty. The key can be a maximum of 128 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

      • Value (string) -- [REQUIRED]

        An optional tag value, such as Production or test-only . The value can be a maximum of 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

Return type

dict

Returns

Response Syntax

{
    'SamplingRuleRecord': {
        'SamplingRule': {
            'RuleName': 'string',
            'RuleARN': 'string',
            'ResourceARN': 'string',
            'Priority': 123,
            'FixedRate': 123.0,
            'ReservoirSize': 123,
            'ServiceName': 'string',
            'ServiceType': 'string',
            'Host': 'string',
            'HTTPMethod': 'string',
            'URLPath': 'string',
            'Version': 123,
            'Attributes': {
                'string': 'string'
            }
        },
        'CreatedAt': datetime(2015, 1, 1),
        'ModifiedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • SamplingRuleRecord (dict) --

      The saved rule definition and metadata.

      • SamplingRule (dict) --

        The sampling rule.

        • RuleName (string) --

          The name of the sampling rule. Specify a rule by either name or ARN, but not both.

        • RuleARN (string) --

          The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.

        • ResourceARN (string) --

          Matches the ARN of the Amazon Web Services resource on which the service runs.

        • Priority (integer) --

          The priority of the sampling rule.

        • FixedRate (float) --

          The percentage of matching requests to instrument, after the reservoir is exhausted.

        • ReservoirSize (integer) --

          A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.

        • ServiceName (string) --

          Matches the name that the service uses to identify itself in segments.

        • ServiceType (string) --

          Matches the origin that the service uses to identify its type in segments.

        • Host (string) --

          Matches the hostname from a request URL.

        • HTTPMethod (string) --

          Matches the HTTP method of a request.

        • URLPath (string) --

          Matches the path from a request URL.

        • Version (integer) --

          The version of the sampling rule format (1 ).

        • Attributes (dict) --

          Matches attributes derived from the request.

          • (string) --
            • (string) --
      • CreatedAt (datetime) --

        When the rule was created.

      • ModifiedAt (datetime) --

        When the rule was last modified.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
  • XRay.Client.exceptions.RuleLimitExceededException
delete_group(**kwargs)

Deletes a group resource.

See also: AWS API Documentation

Request Syntax

response = client.delete_group(
    GroupName='string',
    GroupARN='string'
)
Parameters
  • GroupName (string) -- The case-sensitive name of the group.
  • GroupARN (string) -- The ARN of the group that was generated on creation.
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
delete_sampling_rule(**kwargs)

Deletes a sampling rule.

See also: AWS API Documentation

Request Syntax

response = client.delete_sampling_rule(
    RuleName='string',
    RuleARN='string'
)
Parameters
  • RuleName (string) -- The name of the sampling rule. Specify a rule by either name or ARN, but not both.
  • RuleARN (string) -- The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
Return type

dict

Returns

Response Syntax

{
    'SamplingRuleRecord': {
        'SamplingRule': {
            'RuleName': 'string',
            'RuleARN': 'string',
            'ResourceARN': 'string',
            'Priority': 123,
            'FixedRate': 123.0,
            'ReservoirSize': 123,
            'ServiceName': 'string',
            'ServiceType': 'string',
            'Host': 'string',
            'HTTPMethod': 'string',
            'URLPath': 'string',
            'Version': 123,
            'Attributes': {
                'string': 'string'
            }
        },
        'CreatedAt': datetime(2015, 1, 1),
        'ModifiedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • SamplingRuleRecord (dict) --

      The deleted rule definition and metadata.

      • SamplingRule (dict) --

        The sampling rule.

        • RuleName (string) --

          The name of the sampling rule. Specify a rule by either name or ARN, but not both.

        • RuleARN (string) --

          The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.

        • ResourceARN (string) --

          Matches the ARN of the Amazon Web Services resource on which the service runs.

        • Priority (integer) --

          The priority of the sampling rule.

        • FixedRate (float) --

          The percentage of matching requests to instrument, after the reservoir is exhausted.

        • ReservoirSize (integer) --

          A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.

        • ServiceName (string) --

          Matches the name that the service uses to identify itself in segments.

        • ServiceType (string) --

          Matches the origin that the service uses to identify its type in segments.

        • Host (string) --

          Matches the hostname from a request URL.

        • HTTPMethod (string) --

          Matches the HTTP method of a request.

        • URLPath (string) --

          Matches the path from a request URL.

        • Version (integer) --

          The version of the sampling rule format (1 ).

        • Attributes (dict) --

          Matches attributes derived from the request.

          • (string) --
            • (string) --
      • CreatedAt (datetime) --

        When the rule was created.

      • ModifiedAt (datetime) --

        When the rule was last modified.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_encryption_config()

Retrieves the current encryption configuration for X-Ray data.

See also: AWS API Documentation

Request Syntax

response = client.get_encryption_config()
Return type
dict
Returns
Response Syntax
{
    'EncryptionConfig': {
        'KeyId': 'string',
        'Status': 'UPDATING'|'ACTIVE',
        'Type': 'NONE'|'KMS'
    }
}

Response Structure

  • (dict) --
    • EncryptionConfig (dict) --

      The encryption configuration document.

      • KeyId (string) --

        The ID of the KMS key used for encryption, if applicable.

      • Status (string) --

        The encryption status. While the status is UPDATING , X-Ray may encrypt data with a combination of the new and old settings.

      • Type (string) --

        The type of encryption. Set to KMS for encryption with KMS keys. Set to NONE for default encryption.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_group(**kwargs)

Retrieves group resource details.

See also: AWS API Documentation

Request Syntax

response = client.get_group(
    GroupName='string',
    GroupARN='string'
)
Parameters
  • GroupName (string) -- The case-sensitive name of the group.
  • GroupARN (string) -- The ARN of the group that was generated on creation.
Return type

dict

Returns

Response Syntax

{
    'Group': {
        'GroupName': 'string',
        'GroupARN': 'string',
        'FilterExpression': 'string',
        'InsightsConfiguration': {
            'InsightsEnabled': True|False,
            'NotificationsEnabled': True|False
        }
    }
}

Response Structure

  • (dict) --

    • Group (dict) --

      The group that was requested. Contains the name of the group, the ARN of the group, the filter expression, and the insight configuration assigned to the group.

      • GroupName (string) --

        The unique case-sensitive name of the group.

      • GroupARN (string) --

        The Amazon Resource Name (ARN) of the group generated based on the GroupName.

      • FilterExpression (string) --

        The filter expression defining the parameters to include traces.

      • InsightsConfiguration (dict) --

        The structure containing configurations related to insights.

        • The InsightsEnabled boolean can be set to true to enable insights for the group or false to disable insights for the group.
        • The NotificationsEnabled boolean can be set to true to enable insights notifications through Amazon EventBridge for the group.
        • InsightsEnabled (boolean) --

          Set the InsightsEnabled value to true to enable insights or false to disable insights.

        • NotificationsEnabled (boolean) --

          Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_groups(**kwargs)

Retrieves all active group details.

See also: AWS API Documentation

Request Syntax

response = client.get_groups(
    NextToken='string'
)
Parameters
NextToken (string) -- Pagination token.
Return type
dict
Returns
Response Syntax
{
    'Groups': [
        {
            'GroupName': 'string',
            'GroupARN': 'string',
            'FilterExpression': 'string',
            'InsightsConfiguration': {
                'InsightsEnabled': True|False,
                'NotificationsEnabled': True|False
            }
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --
    • Groups (list) --

      The collection of all active groups.

      • (dict) --

        Details for a group without metadata.

        • GroupName (string) --

          The unique case-sensitive name of the group.

        • GroupARN (string) --

          The ARN of the group generated based on the GroupName.

        • FilterExpression (string) --

          The filter expression defining the parameters to include traces.

        • InsightsConfiguration (dict) --

          The structure containing configurations related to insights.

          • The InsightsEnabled boolean can be set to true to enable insights for the group or false to disable insights for the group.
          • The NotificationsEnabled boolean can be set to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.
          • InsightsEnabled (boolean) --

            Set the InsightsEnabled value to true to enable insights or false to disable insights.

          • NotificationsEnabled (boolean) --

            Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.

    • NextToken (string) --

      Pagination token.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_insight(**kwargs)

Retrieves the summary information of an insight. This includes impact to clients and root cause services, the top anomalous services, the category, the state of the insight, and the start and end time of the insight.

See also: AWS API Documentation

Request Syntax

response = client.get_insight(
    InsightId='string'
)
Parameters
InsightId (string) --

[REQUIRED]

The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.

Return type
dict
Returns
Response Syntax
{
    'Insight': {
        'InsightId': 'string',
        'GroupARN': 'string',
        'GroupName': 'string',
        'RootCauseServiceId': {
            'Name': 'string',
            'Names': [
                'string',
            ],
            'AccountId': 'string',
            'Type': 'string'
        },
        'Categories': [
            'FAULT',
        ],
        'State': 'ACTIVE'|'CLOSED',
        'StartTime': datetime(2015, 1, 1),
        'EndTime': datetime(2015, 1, 1),
        'Summary': 'string',
        'ClientRequestImpactStatistics': {
            'FaultCount': 123,
            'OkCount': 123,
            'TotalCount': 123
        },
        'RootCauseServiceRequestImpactStatistics': {
            'FaultCount': 123,
            'OkCount': 123,
            'TotalCount': 123
        },
        'TopAnomalousServices': [
            {
                'ServiceId': {
                    'Name': 'string',
                    'Names': [
                        'string',
                    ],
                    'AccountId': 'string',
                    'Type': 'string'
                }
            },
        ]
    }
}

Response Structure

  • (dict) --
    • Insight (dict) --

      The summary information of an insight.

      • InsightId (string) --

        The insights unique identifier.

      • GroupARN (string) --

        The Amazon Resource Name (ARN) of the group that the insight belongs to.

      • GroupName (string) --

        The name of the group that the insight belongs to.

      • RootCauseServiceId (dict) --
        • Name (string) --
        • Names (list) --
          • (string) --
        • AccountId (string) --
        • Type (string) --
      • Categories (list) --

        The categories that label and describe the type of insight.

        • (string) --
      • State (string) --

        The current state of the insight.

      • StartTime (datetime) --

        The time, in Unix seconds, at which the insight began.

      • EndTime (datetime) --

        The time, in Unix seconds, at which the insight ended.

      • Summary (string) --

        A brief description of the insight.

      • ClientRequestImpactStatistics (dict) --

        The impact statistics of the client side service. This includes the number of requests to the client service and whether the requests were faults or okay.

        • FaultCount (integer) --

          The number of requests that have resulted in a fault,

        • OkCount (integer) --

          The number of successful requests.

        • TotalCount (integer) --

          The total number of requests to the service.

      • RootCauseServiceRequestImpactStatistics (dict) --

        The impact statistics of the root cause service. This includes the number of requests to the client service and whether the requests were faults or okay.

        • FaultCount (integer) --

          The number of requests that have resulted in a fault,

        • OkCount (integer) --

          The number of successful requests.

        • TotalCount (integer) --

          The total number of requests to the service.

      • TopAnomalousServices (list) --

        The service within the insight that is most impacted by the incident.

        • (dict) --

          The service within the service graph that has anomalously high fault rates.

          • ServiceId (dict) --
            • Name (string) --
            • Names (list) --
              • (string) --
            • AccountId (string) --
            • Type (string) --

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_insight_events(**kwargs)

X-Ray reevaluates insights periodically until they're resolved, and records each intermediate state as an event. You can review an insight's events in the Impact Timeline on the Inspect page in the X-Ray console.

See also: AWS API Documentation

Request Syntax

response = client.get_insight_events(
    InsightId='string',
    MaxResults=123,
    NextToken='string'
)
Parameters
  • InsightId (string) --

    [REQUIRED]

    The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.

  • MaxResults (integer) -- Used to retrieve at most the specified value of events.
  • NextToken (string) -- Specify the pagination token returned by a previous request to retrieve the next page of events.
Return type

dict

Returns

Response Syntax

{
    'InsightEvents': [
        {
            'Summary': 'string',
            'EventTime': datetime(2015, 1, 1),
            'ClientRequestImpactStatistics': {
                'FaultCount': 123,
                'OkCount': 123,
                'TotalCount': 123
            },
            'RootCauseServiceRequestImpactStatistics': {
                'FaultCount': 123,
                'OkCount': 123,
                'TotalCount': 123
            },
            'TopAnomalousServices': [
                {
                    'ServiceId': {
                        'Name': 'string',
                        'Names': [
                            'string',
                        ],
                        'AccountId': 'string',
                        'Type': 'string'
                    }
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InsightEvents (list) --

      A detailed description of the event. This includes the time of the event, client and root cause impact statistics, and the top anomalous service at the time of the event.

      • (dict) --

        X-Ray reevaluates insights periodically until they are resolved, and records each intermediate state in an event. You can review incident events in the Impact Timeline on the Inspect page in the X-Ray console.

        • Summary (string) --

          A brief description of the event.

        • EventTime (datetime) --

          The time, in Unix seconds, at which the event was recorded.

        • ClientRequestImpactStatistics (dict) --

          The impact statistics of the client side service. This includes the number of requests to the client service and whether the requests were faults or okay.

          • FaultCount (integer) --

            The number of requests that have resulted in a fault,

          • OkCount (integer) --

            The number of successful requests.

          • TotalCount (integer) --

            The total number of requests to the service.

        • RootCauseServiceRequestImpactStatistics (dict) --

          The impact statistics of the root cause service. This includes the number of requests to the client service and whether the requests were faults or okay.

          • FaultCount (integer) --

            The number of requests that have resulted in a fault,

          • OkCount (integer) --

            The number of successful requests.

          • TotalCount (integer) --

            The total number of requests to the service.

        • TopAnomalousServices (list) --

          The service during the event that is most impacted by the incident.

          • (dict) --

            The service within the service graph that has anomalously high fault rates.

            • ServiceId (dict) --
              • Name (string) --
              • Names (list) --
                • (string) --
              • AccountId (string) --
              • Type (string) --
    • NextToken (string) --

      Use this token to retrieve the next page of insight events.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_insight_impact_graph(**kwargs)

Retrieves a service graph structure filtered by the specified insight. The service graph is limited to only structural information. For a complete service graph, use this API with the GetServiceGraph API.

See also: AWS API Documentation

Request Syntax

response = client.get_insight_impact_graph(
    InsightId='string',
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    NextToken='string'
)
Parameters
  • InsightId (string) --

    [REQUIRED]

    The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.

  • StartTime (datetime) --

    [REQUIRED]

    The estimated start time of the insight, in Unix time seconds. The StartTime is inclusive of the value provided and can't be more than 30 days old.

  • EndTime (datetime) --

    [REQUIRED]

    The estimated end time of the insight, in Unix time seconds. The EndTime is exclusive of the value provided. The time range between the start time and end time can't be more than six hours.

  • NextToken (string) -- Specify the pagination token returned by a previous request to retrieve the next page of results.
Return type

dict

Returns

Response Syntax

{
    'InsightId': 'string',
    'StartTime': datetime(2015, 1, 1),
    'EndTime': datetime(2015, 1, 1),
    'ServiceGraphStartTime': datetime(2015, 1, 1),
    'ServiceGraphEndTime': datetime(2015, 1, 1),
    'Services': [
        {
            'ReferenceId': 123,
            'Type': 'string',
            'Name': 'string',
            'Names': [
                'string',
            ],
            'AccountId': 'string',
            'Edges': [
                {
                    'ReferenceId': 123
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InsightId (string) --

      The insight's unique identifier.

    • StartTime (datetime) --

      The provided start time.

    • EndTime (datetime) --

      The provided end time.

    • ServiceGraphStartTime (datetime) --

      The time, in Unix seconds, at which the service graph started.

    • ServiceGraphEndTime (datetime) --

      The time, in Unix seconds, at which the service graph ended.

    • Services (list) --

      The Amazon Web Services instrumented services related to the insight.

      • (dict) --

        Information about an application that processed requests, users that made requests, or downstream services, resources, and applications that an application used.

        • ReferenceId (integer) --

          Identifier for the service. Unique within the service map.

        • Type (string) --

          Identifier for the service. Unique within the service map.

          • Amazon Web Services Resource - The type of an Amazon Web Services resource. For example, AWS::EC2::Instance for an application running on Amazon EC2 or AWS::DynamoDB::Table for an Amazon DynamoDB table that the application used.
          • Amazon Web Services Service - The type of an Amazon Web Services service. For example, AWS::DynamoDB for downstream calls to Amazon DynamoDB that didn't target a specific table.
          • Amazon Web Services Service - The type of an Amazon Web Services service. For example, AWS::DynamoDB for downstream calls to Amazon DynamoDB that didn't target a specific table.
          • remote - A downstream service of indeterminate type.
        • Name (string) --

          The canonical name of the service.

        • Names (list) --

          A list of names for the service, including the canonical name.

          • (string) --
        • AccountId (string) --

          Identifier of the Amazon Web Services account in which the service runs.

        • Edges (list) --

          Connections to downstream services.

          • (dict) --

            The connection between two service in an insight impact graph.

            • ReferenceId (integer) --

              Identifier of the edge. Unique within a service map.

    • NextToken (string) --

      Pagination token.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_insight_summaries(**kwargs)

Retrieves the summaries of all insights in the specified group matching the provided filter values.

See also: AWS API Documentation

Request Syntax

response = client.get_insight_summaries(
    States=[
        'ACTIVE'|'CLOSED',
    ],
    GroupARN='string',
    GroupName='string',
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    MaxResults=123,
    NextToken='string'
)
Parameters
  • States (list) --

    The list of insight states.

    • (string) --
  • GroupARN (string) -- The Amazon Resource Name (ARN) of the group. Required if the GroupName isn't provided.
  • GroupName (string) -- The name of the group. Required if the GroupARN isn't provided.
  • StartTime (datetime) --

    [REQUIRED]

    The beginning of the time frame in which the insights started. The start time can't be more than 30 days old.

  • EndTime (datetime) --

    [REQUIRED]

    The end of the time frame in which the insights ended. The end time can't be more than 30 days old.

  • MaxResults (integer) -- The maximum number of results to display.
  • NextToken (string) -- Pagination token.
Return type

dict

Returns

Response Syntax

{
    'InsightSummaries': [
        {
            'InsightId': 'string',
            'GroupARN': 'string',
            'GroupName': 'string',
            'RootCauseServiceId': {
                'Name': 'string',
                'Names': [
                    'string',
                ],
                'AccountId': 'string',
                'Type': 'string'
            },
            'Categories': [
                'FAULT',
            ],
            'State': 'ACTIVE'|'CLOSED',
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'Summary': 'string',
            'ClientRequestImpactStatistics': {
                'FaultCount': 123,
                'OkCount': 123,
                'TotalCount': 123
            },
            'RootCauseServiceRequestImpactStatistics': {
                'FaultCount': 123,
                'OkCount': 123,
                'TotalCount': 123
            },
            'TopAnomalousServices': [
                {
                    'ServiceId': {
                        'Name': 'string',
                        'Names': [
                            'string',
                        ],
                        'AccountId': 'string',
                        'Type': 'string'
                    }
                },
            ],
            'LastUpdateTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • InsightSummaries (list) --

      The summary of each insight within the group matching the provided filters. The summary contains the InsightID, start and end time, the root cause service, the root cause and client impact statistics, the top anomalous services, and the status of the insight.

      • (dict) --

        Information that describes an insight.

        • InsightId (string) --

          The insights unique identifier.

        • GroupARN (string) --

          The Amazon Resource Name (ARN) of the group that the insight belongs to.

        • GroupName (string) --

          The name of the group that the insight belongs to.

        • RootCauseServiceId (dict) --

          • Name (string) --
          • Names (list) --
            • (string) --
          • AccountId (string) --
          • Type (string) --
        • Categories (list) --

          Categories The categories that label and describe the type of insight.

          • (string) --
        • State (string) --

          The current state of the insight.

        • StartTime (datetime) --

          The time, in Unix seconds, at which the insight began.

        • EndTime (datetime) --

          The time, in Unix seconds, at which the insight ended.

        • Summary (string) --

          A brief description of the insight.

        • ClientRequestImpactStatistics (dict) --

          The impact statistics of the client side service. This includes the number of requests to the client service and whether the requests were faults or okay.

          • FaultCount (integer) --

            The number of requests that have resulted in a fault,

          • OkCount (integer) --

            The number of successful requests.

          • TotalCount (integer) --

            The total number of requests to the service.

        • RootCauseServiceRequestImpactStatistics (dict) --

          The impact statistics of the root cause service. This includes the number of requests to the client service and whether the requests were faults or okay.

          • FaultCount (integer) --

            The number of requests that have resulted in a fault,

          • OkCount (integer) --

            The number of successful requests.

          • TotalCount (integer) --

            The total number of requests to the service.

        • TopAnomalousServices (list) --

          The service within the insight that is most impacted by the incident.

          • (dict) --

            The service within the service graph that has anomalously high fault rates.

            • ServiceId (dict) --
              • Name (string) --
              • Names (list) --
                • (string) --
              • AccountId (string) --
              • Type (string) --
        • LastUpdateTime (datetime) --

          The time, in Unix seconds, that the insight was last updated.

    • NextToken (string) --

      Pagination token.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_sampling_rules(**kwargs)

Retrieves all sampling rules.

See also: AWS API Documentation

Request Syntax

response = client.get_sampling_rules(
    NextToken='string'
)
Parameters
NextToken (string) -- Pagination token.
Return type
dict
Returns
Response Syntax
{
    'SamplingRuleRecords': [
        {
            'SamplingRule': {
                'RuleName': 'string',
                'RuleARN': 'string',
                'ResourceARN': 'string',
                'Priority': 123,
                'FixedRate': 123.0,
                'ReservoirSize': 123,
                'ServiceName': 'string',
                'ServiceType': 'string',
                'Host': 'string',
                'HTTPMethod': 'string',
                'URLPath': 'string',
                'Version': 123,
                'Attributes': {
                    'string': 'string'
                }
            },
            'CreatedAt': datetime(2015, 1, 1),
            'ModifiedAt': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --
    • SamplingRuleRecords (list) --

      Rule definitions and metadata.

      • (dict) --

        A SamplingRule and its metadata.

        • SamplingRule (dict) --

          The sampling rule.

          • RuleName (string) --

            The name of the sampling rule. Specify a rule by either name or ARN, but not both.

          • RuleARN (string) --

            The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.

          • ResourceARN (string) --

            Matches the ARN of the Amazon Web Services resource on which the service runs.

          • Priority (integer) --

            The priority of the sampling rule.

          • FixedRate (float) --

            The percentage of matching requests to instrument, after the reservoir is exhausted.

          • ReservoirSize (integer) --

            A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.

          • ServiceName (string) --

            Matches the name that the service uses to identify itself in segments.

          • ServiceType (string) --

            Matches the origin that the service uses to identify its type in segments.

          • Host (string) --

            Matches the hostname from a request URL.

          • HTTPMethod (string) --

            Matches the HTTP method of a request.

          • URLPath (string) --

            Matches the path from a request URL.

          • Version (integer) --

            The version of the sampling rule format (1 ).

          • Attributes (dict) --

            Matches attributes derived from the request.

            • (string) --
              • (string) --
        • CreatedAt (datetime) --

          When the rule was created.

        • ModifiedAt (datetime) --

          When the rule was last modified.

    • NextToken (string) --

      Pagination token.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_sampling_statistic_summaries(**kwargs)

Retrieves information about recent sampling results for all sampling rules.

See also: AWS API Documentation

Request Syntax

response = client.get_sampling_statistic_summaries(
    NextToken='string'
)
Parameters
NextToken (string) -- Pagination token.
Return type
dict
Returns
Response Syntax
{
    'SamplingStatisticSummaries': [
        {
            'RuleName': 'string',
            'Timestamp': datetime(2015, 1, 1),
            'RequestCount': 123,
            'BorrowCount': 123,
            'SampledCount': 123
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --
    • SamplingStatisticSummaries (list) --

      Information about the number of requests instrumented for each sampling rule.

      • (dict) --

        Aggregated request sampling data for a sampling rule across all services for a 10-second window.

        • RuleName (string) --

          The name of the sampling rule.

        • Timestamp (datetime) --

          The start time of the reporting window.

        • RequestCount (integer) --

          The number of requests that matched the rule.

        • BorrowCount (integer) --

          The number of requests recorded with borrowed reservoir quota.

        • SampledCount (integer) --

          The number of requests recorded.

    • NextToken (string) --

      Pagination token.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_sampling_targets(**kwargs)

Requests a sampling quota for rules that the service is using to sample requests.

See also: AWS API Documentation

Request Syntax

response = client.get_sampling_targets(
    SamplingStatisticsDocuments=[
        {
            'RuleName': 'string',
            'ClientID': 'string',
            'Timestamp': datetime(2015, 1, 1),
            'RequestCount': 123,
            'SampledCount': 123,
            'BorrowCount': 123
        },
    ]
)
Parameters
SamplingStatisticsDocuments (list) --

[REQUIRED]

Information about rules that the service is using to sample requests.

  • (dict) --

    Request sampling results for a single rule from a service. Results are for the last 10 seconds unless the service has been assigned a longer reporting interval after a previous call to GetSamplingTargets .

    • RuleName (string) -- [REQUIRED]

      The name of the sampling rule.

    • ClientID (string) -- [REQUIRED]

      A unique identifier for the service in hexadecimal.

    • Timestamp (datetime) -- [REQUIRED]

      The current time.

    • RequestCount (integer) -- [REQUIRED]

      The number of requests that matched the rule.

    • SampledCount (integer) -- [REQUIRED]

      The number of requests recorded.

    • BorrowCount (integer) --

      The number of requests recorded with borrowed reservoir quota.

Return type
dict
Returns
Response Syntax
{
    'SamplingTargetDocuments': [
        {
            'RuleName': 'string',
            'FixedRate': 123.0,
            'ReservoirQuota': 123,
            'ReservoirQuotaTTL': datetime(2015, 1, 1),
            'Interval': 123
        },
    ],
    'LastRuleModification': datetime(2015, 1, 1),
    'UnprocessedStatistics': [
        {
            'RuleName': 'string',
            'ErrorCode': 'string',
            'Message': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • SamplingTargetDocuments (list) --

      Updated rules that the service should use to sample requests.

      • (dict) --

        Temporary changes to a sampling rule configuration. To meet the global sampling target for a rule, X-Ray calculates a new reservoir for each service based on the recent sampling results of all services that called GetSamplingTargets .

        • RuleName (string) --

          The name of the sampling rule.

        • FixedRate (float) --

          The percentage of matching requests to instrument, after the reservoir is exhausted.

        • ReservoirQuota (integer) --

          The number of requests per second that X-Ray allocated for this service.

        • ReservoirQuotaTTL (datetime) --

          When the reservoir quota expires.

        • Interval (integer) --

          The number of seconds for the service to wait before getting sampling targets again.

    • LastRuleModification (datetime) --

      The last time a user changed the sampling rule configuration. If the sampling rule configuration changed since the service last retrieved it, the service should call GetSamplingRules to get the latest version.

    • UnprocessedStatistics (list) --

      Information about SamplingStatisticsDocument that X-Ray could not process.

      • (dict) --

        Sampling statistics from a call to GetSamplingTargets that X-Ray could not process.

        • RuleName (string) --

          The name of the sampling rule.

        • ErrorCode (string) --

          The error code.

        • Message (string) --

          The error message.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_service_graph(**kwargs)

Retrieves a document that describes services that process incoming requests, and downstream services that they call as a result. Root services process incoming requests and make calls to downstream services. Root services are applications that use the Amazon Web Services X-Ray SDK . Downstream services can be other applications, Amazon Web Services resources, HTTP web APIs, or SQL databases.

See also: AWS API Documentation

Request Syntax

response = client.get_service_graph(
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    GroupName='string',
    GroupARN='string',
    NextToken='string'
)
Parameters
  • StartTime (datetime) --

    [REQUIRED]

    The start of the time frame for which to generate a graph.

  • EndTime (datetime) --

    [REQUIRED]

    The end of the timeframe for which to generate a graph.

  • GroupName (string) -- The name of a group based on which you want to generate a graph.
  • GroupARN (string) -- The Amazon Resource Name (ARN) of a group based on which you want to generate a graph.
  • NextToken (string) -- Pagination token.
Return type

dict

Returns

Response Syntax

{
    'StartTime': datetime(2015, 1, 1),
    'EndTime': datetime(2015, 1, 1),
    'Services': [
        {
            'ReferenceId': 123,
            'Name': 'string',
            'Names': [
                'string',
            ],
            'Root': True|False,
            'AccountId': 'string',
            'Type': 'string',
            'State': 'string',
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'Edges': [
                {
                    'ReferenceId': 123,
                    'StartTime': datetime(2015, 1, 1),
                    'EndTime': datetime(2015, 1, 1),
                    'SummaryStatistics': {
                        'OkCount': 123,
                        'ErrorStatistics': {
                            'ThrottleCount': 123,
                            'OtherCount': 123,
                            'TotalCount': 123
                        },
                        'FaultStatistics': {
                            'OtherCount': 123,
                            'TotalCount': 123
                        },
                        'TotalCount': 123,
                        'TotalResponseTime': 123.0
                    },
                    'ResponseTimeHistogram': [
                        {
                            'Value': 123.0,
                            'Count': 123
                        },
                    ],
                    'Aliases': [
                        {
                            'Name': 'string',
                            'Names': [
                                'string',
                            ],
                            'Type': 'string'
                        },
                    ]
                },
            ],
            'SummaryStatistics': {
                'OkCount': 123,
                'ErrorStatistics': {
                    'ThrottleCount': 123,
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'FaultStatistics': {
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'TotalCount': 123,
                'TotalResponseTime': 123.0
            },
            'DurationHistogram': [
                {
                    'Value': 123.0,
                    'Count': 123
                },
            ],
            'ResponseTimeHistogram': [
                {
                    'Value': 123.0,
                    'Count': 123
                },
            ]
        },
    ],
    'ContainsOldGroupVersions': True|False,
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • StartTime (datetime) --

      The start of the time frame for which the graph was generated.

    • EndTime (datetime) --

      The end of the time frame for which the graph was generated.

    • Services (list) --

      The services that have processed a traced request during the specified time frame.

      • (dict) --

        Information about an application that processed requests, users that made requests, or downstream services, resources, and applications that an application used.

        • ReferenceId (integer) --

          Identifier for the service. Unique within the service map.

        • Name (string) --

          The canonical name of the service.

        • Names (list) --

          A list of names for the service, including the canonical name.

          • (string) --
        • Root (boolean) --

          Indicates that the service was the first service to process a request.

        • AccountId (string) --

          Identifier of the Amazon Web Services account in which the service runs.

        • Type (string) --

          The type of service.

          • Amazon Web Services Resource - The type of an Amazon Web Services resource. For example, AWS::EC2::Instance for an application running on Amazon EC2 or AWS::DynamoDB::Table for an Amazon DynamoDB table that the application used.
          • Amazon Web Services Service - The type of an Amazon Web Services service. For example, AWS::DynamoDB for downstream calls to Amazon DynamoDB that didn't target a specific table.
          • client - Represents the clients that sent requests to a root service.
          • remote - A downstream service of indeterminate type.
        • State (string) --

          The service's state.

        • StartTime (datetime) --

          The start time of the first segment that the service generated.

        • EndTime (datetime) --

          The end time of the last segment that the service generated.

        • Edges (list) --

          Connections to downstream services.

          • (dict) --

            Information about a connection between two services.

            • ReferenceId (integer) --

              Identifier of the edge. Unique within a service map.

            • StartTime (datetime) --

              The start time of the first segment on the edge.

            • EndTime (datetime) --

              The end time of the last segment on the edge.

            • SummaryStatistics (dict) --

              Response statistics for segments on the edge.

              • OkCount (integer) --

                The number of requests that completed with a 2xx Success status code.

              • ErrorStatistics (dict) --

                Information about requests that failed with a 4xx Client Error status code.

                • ThrottleCount (integer) --

                  The number of requests that failed with a 419 throttling status code.

                • OtherCount (integer) --

                  The number of requests that failed with untracked 4xx Client Error status codes.

                • TotalCount (integer) --

                  The total number of requests that failed with a 4xx Client Error status code.

              • FaultStatistics (dict) --

                Information about requests that failed with a 5xx Server Error status code.

                • OtherCount (integer) --

                  The number of requests that failed with untracked 5xx Server Error status codes.

                • TotalCount (integer) --

                  The total number of requests that failed with a 5xx Server Error status code.

              • TotalCount (integer) --

                The total number of completed requests.

              • TotalResponseTime (float) --

                The aggregate response time of completed requests.

            • ResponseTimeHistogram (list) --

              A histogram that maps the spread of client response times on an edge.

              • (dict) --

                An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

                • Value (float) --

                  The value of the entry.

                • Count (integer) --

                  The prevalence of the entry.

            • Aliases (list) --

              Aliases for the edge.

              • (dict) --

                An alias for an edge.

                • Name (string) --

                  The canonical name of the alias.

                • Names (list) --

                  A list of names for the alias, including the canonical name.

                  • (string) --
                • Type (string) --

                  The type of the alias.

        • SummaryStatistics (dict) --

          Aggregated statistics for the service.

          • OkCount (integer) --

            The number of requests that completed with a 2xx Success status code.

          • ErrorStatistics (dict) --

            Information about requests that failed with a 4xx Client Error status code.

            • ThrottleCount (integer) --

              The number of requests that failed with a 419 throttling status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 4xx Client Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 4xx Client Error status code.

          • FaultStatistics (dict) --

            Information about requests that failed with a 5xx Server Error status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 5xx Server Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 5xx Server Error status code.

          • TotalCount (integer) --

            The total number of completed requests.

          • TotalResponseTime (float) --

            The aggregate response time of completed requests.

        • DurationHistogram (list) --

          A histogram that maps the spread of service durations.

          • (dict) --

            An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

            • Value (float) --

              The value of the entry.

            • Count (integer) --

              The prevalence of the entry.

        • ResponseTimeHistogram (list) --

          A histogram that maps the spread of service response times.

          • (dict) --

            An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

            • Value (float) --

              The value of the entry.

            • Count (integer) --

              The prevalence of the entry.

    • ContainsOldGroupVersions (boolean) --

      A flag indicating whether the group's filter expression has been consistent, or if the returned service graph may show traces from an older version of the group's filter expression.

    • NextToken (string) --

      Pagination token.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_time_series_service_statistics(**kwargs)

Get an aggregation of service statistics defined by a specific time range.

See also: AWS API Documentation

Request Syntax

response = client.get_time_series_service_statistics(
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    GroupName='string',
    GroupARN='string',
    EntitySelectorExpression='string',
    Period=123,
    ForecastStatistics=True|False,
    NextToken='string'
)
Parameters
  • StartTime (datetime) --

    [REQUIRED]

    The start of the time frame for which to aggregate statistics.

  • EndTime (datetime) --

    [REQUIRED]

    The end of the time frame for which to aggregate statistics.

  • GroupName (string) -- The case-sensitive name of the group for which to pull statistics from.
  • GroupARN (string) -- The Amazon Resource Name (ARN) of the group for which to pull statistics from.
  • EntitySelectorExpression (string) -- A filter expression defining entities that will be aggregated for statistics. Supports ID, service, and edge functions. If no selector expression is specified, edge statistics are returned.
  • Period (integer) -- Aggregation period in seconds.
  • ForecastStatistics (boolean) -- The forecasted high and low fault count values. Forecast enabled requests require the EntitySelectorExpression ID be provided.
  • NextToken (string) -- Pagination token.
Return type

dict

Returns

Response Syntax

{
    'TimeSeriesServiceStatistics': [
        {
            'Timestamp': datetime(2015, 1, 1),
            'EdgeSummaryStatistics': {
                'OkCount': 123,
                'ErrorStatistics': {
                    'ThrottleCount': 123,
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'FaultStatistics': {
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'TotalCount': 123,
                'TotalResponseTime': 123.0
            },
            'ServiceSummaryStatistics': {
                'OkCount': 123,
                'ErrorStatistics': {
                    'ThrottleCount': 123,
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'FaultStatistics': {
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'TotalCount': 123,
                'TotalResponseTime': 123.0
            },
            'ServiceForecastStatistics': {
                'FaultCountHigh': 123,
                'FaultCountLow': 123
            },
            'ResponseTimeHistogram': [
                {
                    'Value': 123.0,
                    'Count': 123
                },
            ]
        },
    ],
    'ContainsOldGroupVersions': True|False,
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TimeSeriesServiceStatistics (list) --

      The collection of statistics.

      • (dict) --

        A list of TimeSeriesStatistic structures.

        • Timestamp (datetime) --

          Timestamp of the window for which statistics are aggregated.

        • EdgeSummaryStatistics (dict) --

          Response statistics for an edge.

          • OkCount (integer) --

            The number of requests that completed with a 2xx Success status code.

          • ErrorStatistics (dict) --

            Information about requests that failed with a 4xx Client Error status code.

            • ThrottleCount (integer) --

              The number of requests that failed with a 419 throttling status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 4xx Client Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 4xx Client Error status code.

          • FaultStatistics (dict) --

            Information about requests that failed with a 5xx Server Error status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 5xx Server Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 5xx Server Error status code.

          • TotalCount (integer) --

            The total number of completed requests.

          • TotalResponseTime (float) --

            The aggregate response time of completed requests.

        • ServiceSummaryStatistics (dict) --

          Response statistics for a service.

          • OkCount (integer) --

            The number of requests that completed with a 2xx Success status code.

          • ErrorStatistics (dict) --

            Information about requests that failed with a 4xx Client Error status code.

            • ThrottleCount (integer) --

              The number of requests that failed with a 419 throttling status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 4xx Client Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 4xx Client Error status code.

          • FaultStatistics (dict) --

            Information about requests that failed with a 5xx Server Error status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 5xx Server Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 5xx Server Error status code.

          • TotalCount (integer) --

            The total number of completed requests.

          • TotalResponseTime (float) --

            The aggregate response time of completed requests.

        • ServiceForecastStatistics (dict) --

          The forecasted high and low fault count values.

          • FaultCountHigh (integer) --

            The upper limit of fault counts for a service.

          • FaultCountLow (integer) --

            The lower limit of fault counts for a service.

        • ResponseTimeHistogram (list) --

          The response time histogram for the selected entities.

          • (dict) --

            An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

            • Value (float) --

              The value of the entry.

            • Count (integer) --

              The prevalence of the entry.

    • ContainsOldGroupVersions (boolean) --

      A flag indicating whether or not a group's filter expression has been consistent, or if a returned aggregation might show statistics from an older version of the group's filter expression.

    • NextToken (string) --

      Pagination token.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_trace_graph(**kwargs)

Retrieves a service graph for one or more specific trace IDs.

See also: AWS API Documentation

Request Syntax

response = client.get_trace_graph(
    TraceIds=[
        'string',
    ],
    NextToken='string'
)
Parameters
  • TraceIds (list) --

    [REQUIRED]

    Trace IDs of requests for which to generate a service graph.

    • (string) --
  • NextToken (string) -- Pagination token.
Return type

dict

Returns

Response Syntax

{
    'Services': [
        {
            'ReferenceId': 123,
            'Name': 'string',
            'Names': [
                'string',
            ],
            'Root': True|False,
            'AccountId': 'string',
            'Type': 'string',
            'State': 'string',
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'Edges': [
                {
                    'ReferenceId': 123,
                    'StartTime': datetime(2015, 1, 1),
                    'EndTime': datetime(2015, 1, 1),
                    'SummaryStatistics': {
                        'OkCount': 123,
                        'ErrorStatistics': {
                            'ThrottleCount': 123,
                            'OtherCount': 123,
                            'TotalCount': 123
                        },
                        'FaultStatistics': {
                            'OtherCount': 123,
                            'TotalCount': 123
                        },
                        'TotalCount': 123,
                        'TotalResponseTime': 123.0
                    },
                    'ResponseTimeHistogram': [
                        {
                            'Value': 123.0,
                            'Count': 123
                        },
                    ],
                    'Aliases': [
                        {
                            'Name': 'string',
                            'Names': [
                                'string',
                            ],
                            'Type': 'string'
                        },
                    ]
                },
            ],
            'SummaryStatistics': {
                'OkCount': 123,
                'ErrorStatistics': {
                    'ThrottleCount': 123,
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'FaultStatistics': {
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'TotalCount': 123,
                'TotalResponseTime': 123.0
            },
            'DurationHistogram': [
                {
                    'Value': 123.0,
                    'Count': 123
                },
            ],
            'ResponseTimeHistogram': [
                {
                    'Value': 123.0,
                    'Count': 123
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Services (list) --

      The services that have processed one of the specified requests.

      • (dict) --

        Information about an application that processed requests, users that made requests, or downstream services, resources, and applications that an application used.

        • ReferenceId (integer) --

          Identifier for the service. Unique within the service map.

        • Name (string) --

          The canonical name of the service.

        • Names (list) --

          A list of names for the service, including the canonical name.

          • (string) --
        • Root (boolean) --

          Indicates that the service was the first service to process a request.

        • AccountId (string) --

          Identifier of the Amazon Web Services account in which the service runs.

        • Type (string) --

          The type of service.

          • Amazon Web Services Resource - The type of an Amazon Web Services resource. For example, AWS::EC2::Instance for an application running on Amazon EC2 or AWS::DynamoDB::Table for an Amazon DynamoDB table that the application used.
          • Amazon Web Services Service - The type of an Amazon Web Services service. For example, AWS::DynamoDB for downstream calls to Amazon DynamoDB that didn't target a specific table.
          • client - Represents the clients that sent requests to a root service.
          • remote - A downstream service of indeterminate type.
        • State (string) --

          The service's state.

        • StartTime (datetime) --

          The start time of the first segment that the service generated.

        • EndTime (datetime) --

          The end time of the last segment that the service generated.

        • Edges (list) --

          Connections to downstream services.

          • (dict) --

            Information about a connection between two services.

            • ReferenceId (integer) --

              Identifier of the edge. Unique within a service map.

            • StartTime (datetime) --

              The start time of the first segment on the edge.

            • EndTime (datetime) --

              The end time of the last segment on the edge.

            • SummaryStatistics (dict) --

              Response statistics for segments on the edge.

              • OkCount (integer) --

                The number of requests that completed with a 2xx Success status code.

              • ErrorStatistics (dict) --

                Information about requests that failed with a 4xx Client Error status code.

                • ThrottleCount (integer) --

                  The number of requests that failed with a 419 throttling status code.

                • OtherCount (integer) --

                  The number of requests that failed with untracked 4xx Client Error status codes.

                • TotalCount (integer) --

                  The total number of requests that failed with a 4xx Client Error status code.

              • FaultStatistics (dict) --

                Information about requests that failed with a 5xx Server Error status code.

                • OtherCount (integer) --

                  The number of requests that failed with untracked 5xx Server Error status codes.

                • TotalCount (integer) --

                  The total number of requests that failed with a 5xx Server Error status code.

              • TotalCount (integer) --

                The total number of completed requests.

              • TotalResponseTime (float) --

                The aggregate response time of completed requests.

            • ResponseTimeHistogram (list) --

              A histogram that maps the spread of client response times on an edge.

              • (dict) --

                An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

                • Value (float) --

                  The value of the entry.

                • Count (integer) --

                  The prevalence of the entry.

            • Aliases (list) --

              Aliases for the edge.

              • (dict) --

                An alias for an edge.

                • Name (string) --

                  The canonical name of the alias.

                • Names (list) --

                  A list of names for the alias, including the canonical name.

                  • (string) --
                • Type (string) --

                  The type of the alias.

        • SummaryStatistics (dict) --

          Aggregated statistics for the service.

          • OkCount (integer) --

            The number of requests that completed with a 2xx Success status code.

          • ErrorStatistics (dict) --

            Information about requests that failed with a 4xx Client Error status code.

            • ThrottleCount (integer) --

              The number of requests that failed with a 419 throttling status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 4xx Client Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 4xx Client Error status code.

          • FaultStatistics (dict) --

            Information about requests that failed with a 5xx Server Error status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 5xx Server Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 5xx Server Error status code.

          • TotalCount (integer) --

            The total number of completed requests.

          • TotalResponseTime (float) --

            The aggregate response time of completed requests.

        • DurationHistogram (list) --

          A histogram that maps the spread of service durations.

          • (dict) --

            An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

            • Value (float) --

              The value of the entry.

            • Count (integer) --

              The prevalence of the entry.

        • ResponseTimeHistogram (list) --

          A histogram that maps the spread of service response times.

          • (dict) --

            An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

            • Value (float) --

              The value of the entry.

            • Count (integer) --

              The prevalence of the entry.

    • NextToken (string) --

      Pagination token.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_trace_summaries(**kwargs)

Retrieves IDs and annotations for traces available for a specified time frame using an optional filter. To get the full traces, pass the trace IDs to BatchGetTraces .

A filter expression can target traced requests that hit specific service nodes or edges, have errors, or come from a known user. For example, the following filter expression targets traces that pass through api.example.com :

service("api.example.com")

This filter expression finds traces that have an annotation named account with the value 12345 :

annotation.account = "12345"

For a full list of indexed fields and keywords that you can use in filter expressions, see Using Filter Expressions in the Amazon Web Services X-Ray Developer Guide .

See also: AWS API Documentation

Request Syntax

response = client.get_trace_summaries(
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    TimeRangeType='TraceId'|'Event',
    Sampling=True|False,
    SamplingStrategy={
        'Name': 'PartialScan'|'FixedRate',
        'Value': 123.0
    },
    FilterExpression='string',
    NextToken='string'
)
Parameters
  • StartTime (datetime) --

    [REQUIRED]

    The start of the time frame for which to retrieve traces.

  • EndTime (datetime) --

    [REQUIRED]

    The end of the time frame for which to retrieve traces.

  • TimeRangeType (string) -- A parameter to indicate whether to query trace summaries by TraceId or Event time.
  • Sampling (boolean) -- Set to true to get summaries for only a subset of available traces.
  • SamplingStrategy (dict) --

    A parameter to indicate whether to enable sampling on trace summaries. Input parameters are Name and Value.

    • Name (string) --

      The name of a sampling rule.

    • Value (float) --

      The value of a sampling rule.

  • FilterExpression (string) -- Specify a filter expression to retrieve trace summaries for services or requests that meet certain requirements.
  • NextToken (string) -- Specify the pagination token returned by a previous request to retrieve the next page of results.
Return type

dict

Returns

Response Syntax

{
    'TraceSummaries': [
        {
            'Id': 'string',
            'Duration': 123.0,
            'ResponseTime': 123.0,
            'HasFault': True|False,
            'HasError': True|False,
            'HasThrottle': True|False,
            'IsPartial': True|False,
            'Http': {
                'HttpURL': 'string',
                'HttpStatus': 123,
                'HttpMethod': 'string',
                'UserAgent': 'string',
                'ClientIp': 'string'
            },
            'Annotations': {
                'string': [
                    {
                        'AnnotationValue': {
                            'NumberValue': 123.0,
                            'BooleanValue': True|False,
                            'StringValue': 'string'
                        },
                        'ServiceIds': [
                            {
                                'Name': 'string',
                                'Names': [
                                    'string',
                                ],
                                'AccountId': 'string',
                                'Type': 'string'
                            },
                        ]
                    },
                ]
            },
            'Users': [
                {
                    'UserName': 'string',
                    'ServiceIds': [
                        {
                            'Name': 'string',
                            'Names': [
                                'string',
                            ],
                            'AccountId': 'string',
                            'Type': 'string'
                        },
                    ]
                },
            ],
            'ServiceIds': [
                {
                    'Name': 'string',
                    'Names': [
                        'string',
                    ],
                    'AccountId': 'string',
                    'Type': 'string'
                },
            ],
            'ResourceARNs': [
                {
                    'ARN': 'string'
                },
            ],
            'InstanceIds': [
                {
                    'Id': 'string'
                },
            ],
            'AvailabilityZones': [
                {
                    'Name': 'string'
                },
            ],
            'EntryPoint': {
                'Name': 'string',
                'Names': [
                    'string',
                ],
                'AccountId': 'string',
                'Type': 'string'
            },
            'FaultRootCauses': [
                {
                    'Services': [
                        {
                            'Name': 'string',
                            'Names': [
                                'string',
                            ],
                            'Type': 'string',
                            'AccountId': 'string',
                            'EntityPath': [
                                {
                                    'Name': 'string',
                                    'Exceptions': [
                                        {
                                            'Name': 'string',
                                            'Message': 'string'
                                        },
                                    ],
                                    'Remote': True|False
                                },
                            ],
                            'Inferred': True|False
                        },
                    ],
                    'ClientImpacting': True|False
                },
            ],
            'ErrorRootCauses': [
                {
                    'Services': [
                        {
                            'Name': 'string',
                            'Names': [
                                'string',
                            ],
                            'Type': 'string',
                            'AccountId': 'string',
                            'EntityPath': [
                                {
                                    'Name': 'string',
                                    'Exceptions': [
                                        {
                                            'Name': 'string',
                                            'Message': 'string'
                                        },
                                    ],
                                    'Remote': True|False
                                },
                            ],
                            'Inferred': True|False
                        },
                    ],
                    'ClientImpacting': True|False
                },
            ],
            'ResponseTimeRootCauses': [
                {
                    'Services': [
                        {
                            'Name': 'string',
                            'Names': [
                                'string',
                            ],
                            'Type': 'string',
                            'AccountId': 'string',
                            'EntityPath': [
                                {
                                    'Name': 'string',
                                    'Coverage': 123.0,
                                    'Remote': True|False
                                },
                            ],
                            'Inferred': True|False
                        },
                    ],
                    'ClientImpacting': True|False
                },
            ],
            'Revision': 123,
            'MatchedEventTime': datetime(2015, 1, 1)
        },
    ],
    'ApproximateTime': datetime(2015, 1, 1),
    'TracesProcessedCount': 123,
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • TraceSummaries (list) --

      Trace IDs and annotations for traces that were found in the specified time frame.

      • (dict) --

        Metadata generated from the segment documents in a trace.

        • Id (string) --

          The unique identifier for the request that generated the trace's segments and subsegments.

        • Duration (float) --

          The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.

        • ResponseTime (float) --

          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.

        • HasFault (boolean) --

          The root segment document has a 500 series error.

        • HasError (boolean) --

          The root segment document has a 400 series error.

        • HasThrottle (boolean) --

          One or more of the segment documents has a 429 throttling error.

        • IsPartial (boolean) --

          One or more of the segment documents is in progress.

        • Http (dict) --

          Information about the HTTP request served by the trace.

          • HttpURL (string) --

            The request URL.

          • HttpStatus (integer) --

            The response status.

          • HttpMethod (string) --

            The request method.

          • UserAgent (string) --

            The request's user agent string.

          • ClientIp (string) --

            The IP address of the requestor.

        • Annotations (dict) --

          Annotations from the trace's segment documents.

          • (string) --

            • (list) --

              • (dict) --

                Information about a segment annotation.

                • AnnotationValue (dict) --

                  Values of the annotation.

                  • NumberValue (float) --

                    Value for a Number annotation.

                  • BooleanValue (boolean) --

                    Value for a Boolean annotation.

                  • StringValue (string) --

                    Value for a String annotation.

                • ServiceIds (list) --

                  Services to which the annotation applies.

                  • (dict) --
                    • Name (string) --
                    • Names (list) --
                      • (string) --
                    • AccountId (string) --
                    • Type (string) --
        • Users (list) --

          Users from the trace's segment documents.

          • (dict) --

            Information about a user recorded in segment documents.

            • UserName (string) --

              The user's name.

            • ServiceIds (list) --

              Services that the user's request hit.

              • (dict) --
                • Name (string) --
                • Names (list) --
                  • (string) --
                • AccountId (string) --
                • Type (string) --
        • ServiceIds (list) --

          Service IDs from the trace's segment documents.

          • (dict) --
            • Name (string) --
            • Names (list) --
              • (string) --
            • AccountId (string) --
            • Type (string) --
        • ResourceARNs (list) --

          A list of resource ARNs for any resource corresponding to the trace segments.

          • (dict) --

            A list of resources ARNs corresponding to the segments in a trace.

            • ARN (string) --

              The ARN of a corresponding resource.

        • InstanceIds (list) --

          A list of EC2 instance IDs for any instance corresponding to the trace segments.

          • (dict) --

            A list of EC2 instance IDs corresponding to the segments in a trace.

            • Id (string) --

              The ID of a corresponding EC2 instance.

        • AvailabilityZones (list) --

          A list of Availability Zones for any zone corresponding to the trace segments.

          • (dict) --

            A list of Availability Zones corresponding to the segments in a trace.

            • Name (string) --

              The name of a corresponding Availability Zone.

        • EntryPoint (dict) --

          The root of a trace.

          • Name (string) --
          • Names (list) --
            • (string) --
          • AccountId (string) --
          • Type (string) --
        • FaultRootCauses (list) --

          A collection of FaultRootCause structures corresponding to the trace segments.

          • (dict) --

            The root cause information for a trace summary fault.

            • Services (list) --

              A list of corresponding services. A service identifies a segment and it contains a name, account ID, type, and inferred flag.

              • (dict) --

                A collection of fields identifying the services in a trace summary fault.

                • Name (string) --

                  The service name.

                • Names (list) --

                  A collection of associated service names.

                  • (string) --
                • Type (string) --

                  The type associated to the service.

                • AccountId (string) --

                  The account ID associated to the service.

                • EntityPath (list) --

                  The path of root cause entities found on the service.

                  • (dict) --

                    A collection of segments and corresponding subsegments associated to a trace summary fault error.

                    • Name (string) --

                      The name of the entity.

                    • Exceptions (list) --

                      The types and messages of the exceptions.

                      • (dict) --

                        The exception associated with a root cause.

                        • Name (string) --

                          The name of the exception.

                        • Message (string) --

                          The message of the exception.

                    • Remote (boolean) --

                      A flag that denotes a remote subsegment.

                • Inferred (boolean) --

                  A Boolean value indicating if the service is inferred from the trace.

            • ClientImpacting (boolean) --

              A flag that denotes that the root cause impacts the trace client.

        • ErrorRootCauses (list) --

          A collection of ErrorRootCause structures corresponding to the trace segments.

          • (dict) --

            The root cause of a trace summary error.

            • Services (list) --

              A list of services corresponding to an error. A service identifies a segment and it contains a name, account ID, type, and inferred flag.

              • (dict) --

                A collection of fields identifying the services in a trace summary error.

                • Name (string) --

                  The service name.

                • Names (list) --

                  A collection of associated service names.

                  • (string) --
                • Type (string) --

                  The type associated to the service.

                • AccountId (string) --

                  The account ID associated to the service.

                • EntityPath (list) --

                  The path of root cause entities found on the service.

                  • (dict) --

                    A collection of segments and corresponding subsegments associated to a trace summary error.

                    • Name (string) --

                      The name of the entity.

                    • Exceptions (list) --

                      The types and messages of the exceptions.

                      • (dict) --

                        The exception associated with a root cause.

                        • Name (string) --

                          The name of the exception.

                        • Message (string) --

                          The message of the exception.

                    • Remote (boolean) --

                      A flag that denotes a remote subsegment.

                • Inferred (boolean) --

                  A Boolean value indicating if the service is inferred from the trace.

            • ClientImpacting (boolean) --

              A flag that denotes that the root cause impacts the trace client.

        • ResponseTimeRootCauses (list) --

          A collection of ResponseTimeRootCause structures corresponding to the trace segments.

          • (dict) --

            The root cause information for a response time warning.

            • Services (list) --

              A list of corresponding services. A service identifies a segment and contains a name, account ID, type, and inferred flag.

              • (dict) --

                A collection of fields identifying the service in a response time warning.

                • Name (string) --

                  The service name.

                • Names (list) --

                  A collection of associated service names.

                  • (string) --
                • Type (string) --

                  The type associated to the service.

                • AccountId (string) --

                  The account ID associated to the service.

                • EntityPath (list) --

                  The path of root cause entities found on the service.

                  • (dict) --

                    A collection of segments and corresponding subsegments associated to a response time warning.

                    • Name (string) --

                      The name of the entity.

                    • Coverage (float) --

                      The type and messages of the exceptions.

                    • Remote (boolean) --

                      A flag that denotes a remote subsegment.

                • Inferred (boolean) --

                  A Boolean value indicating if the service is inferred from the trace.

            • ClientImpacting (boolean) --

              A flag that denotes that the root cause impacts the trace client.

        • Revision (integer) --

          The revision number of a trace.

        • MatchedEventTime (datetime) --

          The matched time stamp of a defined event.

    • ApproximateTime (datetime) --

      The start time of this page of results.

    • TracesProcessedCount (integer) --

      The total number of traces processed, including traces that did not match the specified filter expression.

    • NextToken (string) --

      If the requested time frame contained more than one page of results, you can use this token to retrieve the next page. The first page contains the most recent results, closest to the end of the time frame.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_tags_for_resource(**kwargs)

Returns a list of tags that are applied to the specified Amazon Web Services X-Ray group or sampling rule.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    ResourceARN='string',
    NextToken='string'
)
Parameters
  • ResourceARN (string) --

    [REQUIRED]

    The Amazon Resource Number (ARN) of an X-Ray group or sampling rule.

  • NextToken (string) -- A pagination token. If multiple pages of results are returned, use the NextToken value returned with the current page of results as the value of this parameter to get the next page of results.
Return type

dict

Returns

Response Syntax

{
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • Tags (list) --

      A list of tags, as key and value pairs, that is associated with the specified X-Ray group or sampling rule.

      • (dict) --

        A map that contains tag keys and tag values to attach to an Amazon Web Services X-Ray group or sampling rule. For more information about ways to use tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference .

        The following restrictions apply to tags:

        • Maximum number of user-applied tags per resource: 50
        • Tag keys and values are case sensitive.
        • Don't use aws: as a prefix for keys; it's reserved for Amazon Web Services use. You cannot edit or delete system tags.
        • Key (string) --

          A tag key, such as Stage or Name . A tag key cannot be empty. The key can be a maximum of 128 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

        • Value (string) --

          An optional tag value, such as Production or test-only . The value can be a maximum of 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

    • NextToken (string) --

      A pagination token. If multiple pages of results are returned, use the NextToken value returned with the current page of results to get the next page of results.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
  • XRay.Client.exceptions.ResourceNotFoundException
put_encryption_config(**kwargs)

Updates the encryption configuration for X-Ray data.

See also: AWS API Documentation

Request Syntax

response = client.put_encryption_config(
    KeyId='string',
    Type='NONE'|'KMS'
)
Parameters
  • KeyId (string) --

    An Amazon Web Services KMS key in one of the following formats:

    • Alias - The name of the key. For example, alias/MyKey .
    • Key ID - The KMS key ID of the key. For example, ae4aa6d49-a4d8-9df9-a475-4ff6d7898456 . Amazon Web Services X-Ray does not support asymmetric KMS keys.
    • ARN - The full Amazon Resource Name of the key ID or alias. For example, arn:aws:kms:us-east-2:123456789012:key/ae4aa6d49-a4d8-9df9-a475-4ff6d7898456 . Use this format to specify a key in a different account.

    Omit this key if you set Type to NONE .

  • Type (string) --

    [REQUIRED]

    The type of encryption. Set to KMS to use your own key for encryption. Set to NONE for default encryption.

Return type

dict

Returns

Response Syntax

{
    'EncryptionConfig': {
        'KeyId': 'string',
        'Status': 'UPDATING'|'ACTIVE',
        'Type': 'NONE'|'KMS'
    }
}

Response Structure

  • (dict) --

    • EncryptionConfig (dict) --

      The new encryption configuration.

      • KeyId (string) --

        The ID of the KMS key used for encryption, if applicable.

      • Status (string) --

        The encryption status. While the status is UPDATING , X-Ray may encrypt data with a combination of the new and old settings.

      • Type (string) --

        The type of encryption. Set to KMS for encryption with KMS keys. Set to NONE for default encryption.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
put_telemetry_records(**kwargs)

Used by the Amazon Web Services X-Ray daemon to upload telemetry.

See also: AWS API Documentation

Request Syntax

response = client.put_telemetry_records(
    TelemetryRecords=[
        {
            'Timestamp': datetime(2015, 1, 1),
            'SegmentsReceivedCount': 123,
            'SegmentsSentCount': 123,
            'SegmentsSpilloverCount': 123,
            'SegmentsRejectedCount': 123,
            'BackendConnectionErrors': {
                'TimeoutCount': 123,
                'ConnectionRefusedCount': 123,
                'HTTPCode4XXCount': 123,
                'HTTPCode5XXCount': 123,
                'UnknownHostCount': 123,
                'OtherCount': 123
            }
        },
    ],
    EC2InstanceId='string',
    Hostname='string',
    ResourceARN='string'
)
Parameters
  • TelemetryRecords (list) --

    [REQUIRED]

    • (dict) --
      • Timestamp (datetime) -- [REQUIRED]
      • SegmentsReceivedCount (integer) --
      • SegmentsSentCount (integer) --
      • SegmentsSpilloverCount (integer) --
      • SegmentsRejectedCount (integer) --
      • BackendConnectionErrors (dict) --
        • TimeoutCount (integer) --
        • ConnectionRefusedCount (integer) --
        • HTTPCode4XXCount (integer) --
        • HTTPCode5XXCount (integer) --
        • UnknownHostCount (integer) --
        • OtherCount (integer) --
  • EC2InstanceId (string) --
  • Hostname (string) --
  • ResourceARN (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
put_trace_segments(**kwargs)

Uploads segment documents to Amazon Web Services X-Ray. The X-Ray SDK generates segment documents and sends them to the X-Ray daemon, which uploads them in batches. A segment document can be a completed segment, an in-progress segment, or an array of subsegments.

Segments must include the following fields. For the full segment document schema, see Amazon Web Services X-Ray Segment Documents in the Amazon Web Services X-Ray Developer Guide .

Required segment document fields
  • name - The name of the service that handled the request.
  • id - A 64-bit identifier for the segment, unique among segments in the same trace, in 16 hexadecimal digits.
  • trace_id - A unique identifier that connects all segments and subsegments originating from a single client request.
  • start_time - Time the segment or subsegment was created, in floating point seconds in epoch time, accurate to milliseconds. For example, 1480615200.010 or 1.480615200010E9 .
  • end_time - Time the segment or subsegment was closed. For example, 1480615200.090 or 1.480615200090E9 . Specify either an end_time or in_progress .
  • in_progress - Set to true instead of specifying an end_time to record that a segment has been 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 that the request was received. When the response is sent, send the complete segment to overwrite the in-progress segment.

A trace_id consists of three numbers separated by hyphens. For example, 1-58406520-a006649127e371903a2de979. This includes:

Trace ID Format
  • The version number, for instance, 1 .
  • The time of the original request, in Unix epoch time, in 8 hexadecimal digits. For example, 10:00AM December 2nd, 2016 PST in epoch time is 1480615200 seconds, or 58406520 in hexadecimal.
  • A 96-bit identifier for the trace, globally unique, in 24 hexadecimal digits.

See also: AWS API Documentation

Request Syntax

response = client.put_trace_segments(
    TraceSegmentDocuments=[
        'string',
    ]
)
Parameters
TraceSegmentDocuments (list) --

[REQUIRED]

A string containing a JSON document defining one or more segments or subsegments.

  • (string) --
Return type
dict
Returns
Response Syntax
{
    'UnprocessedTraceSegments': [
        {
            'Id': 'string',
            'ErrorCode': 'string',
            'Message': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • UnprocessedTraceSegments (list) --

      Segments that failed processing.

      • (dict) --

        Information about a segment that failed processing.

        • Id (string) --

          The segment's ID.

        • ErrorCode (string) --

          The error that caused processing to fail.

        • Message (string) --

          The error message.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
tag_resource(**kwargs)

Applies tags to an existing Amazon Web Services X-Ray group or sampling rule.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    ResourceARN='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ResourceARN (string) --

    [REQUIRED]

    The Amazon Resource Number (ARN) of an X-Ray group or sampling rule.

  • Tags (list) --

    [REQUIRED]

    A map that contains one or more tag keys and tag values to attach to an X-Ray group or sampling rule. For more information about ways to use tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference .

    The following restrictions apply to tags:

    • Maximum number of user-applied tags per resource: 50
    • Maximum tag key length: 128 Unicode characters
    • Maximum tag value length: 256 Unicode characters
    • Valid values for key and value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and @
    • Tag keys and values are case sensitive.
    • Don't use aws: as a prefix for keys; it's reserved for Amazon Web Services use. You cannot edit or delete system tags.
    • (dict) --

      A map that contains tag keys and tag values to attach to an Amazon Web Services X-Ray group or sampling rule. For more information about ways to use tags, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference .

      The following restrictions apply to tags:

      • Maximum number of user-applied tags per resource: 50
      • Tag keys and values are case sensitive.
      • Don't use aws: as a prefix for keys; it's reserved for Amazon Web Services use. You cannot edit or delete system tags.
      • Key (string) -- [REQUIRED]

        A tag key, such as Stage or Name . A tag key cannot be empty. The key can be a maximum of 128 characters, and can contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

      • Value (string) -- [REQUIRED]

        An optional tag value, such as Production or test-only . The value can be a maximum of 255 characters, and contain only Unicode letters, numbers, or separators, or the following special characters: + - = . _ : /

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
  • XRay.Client.exceptions.ResourceNotFoundException
  • XRay.Client.exceptions.TooManyTagsException
untag_resource(**kwargs)

Removes tags from an Amazon Web Services X-Ray group or sampling rule. You cannot edit or delete system tags (those with an aws: prefix).

See also: AWS API Documentation

Request Syntax

response = client.untag_resource(
    ResourceARN='string',
    TagKeys=[
        'string',
    ]
)
Parameters
  • ResourceARN (string) --

    [REQUIRED]

    The Amazon Resource Number (ARN) of an X-Ray group or sampling rule.

  • TagKeys (list) --

    [REQUIRED]

    Keys for one or more tags that you want to remove from an X-Ray group or sampling rule.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
  • XRay.Client.exceptions.ResourceNotFoundException
update_group(**kwargs)

Updates a group resource.

See also: AWS API Documentation

Request Syntax

response = client.update_group(
    GroupName='string',
    GroupARN='string',
    FilterExpression='string',
    InsightsConfiguration={
        'InsightsEnabled': True|False,
        'NotificationsEnabled': True|False
    }
)
Parameters
  • GroupName (string) -- The case-sensitive name of the group.
  • GroupARN (string) -- The ARN that was generated upon creation.
  • FilterExpression (string) -- The updated filter expression defining criteria by which to group traces.
  • InsightsConfiguration (dict) --

    The structure containing configurations related to insights.

    • The InsightsEnabled boolean can be set to true to enable insights for the group or false to disable insights for the group.
    • The NotifcationsEnabled boolean can be set to true to enable insights notifications for the group. Notifications can only be enabled on a group with InsightsEnabled set to true.
    • InsightsEnabled (boolean) --

      Set the InsightsEnabled value to true to enable insights or false to disable insights.

    • NotificationsEnabled (boolean) --

      Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.

Return type

dict

Returns

Response Syntax

{
    'Group': {
        'GroupName': 'string',
        'GroupARN': 'string',
        'FilterExpression': 'string',
        'InsightsConfiguration': {
            'InsightsEnabled': True|False,
            'NotificationsEnabled': True|False
        }
    }
}

Response Structure

  • (dict) --

    • Group (dict) --

      The group that was updated. Contains the name of the group that was updated, the ARN of the group that was updated, the updated filter expression, and the updated insight configuration assigned to the group.

      • GroupName (string) --

        The unique case-sensitive name of the group.

      • GroupARN (string) --

        The Amazon Resource Name (ARN) of the group generated based on the GroupName.

      • FilterExpression (string) --

        The filter expression defining the parameters to include traces.

      • InsightsConfiguration (dict) --

        The structure containing configurations related to insights.

        • The InsightsEnabled boolean can be set to true to enable insights for the group or false to disable insights for the group.
        • The NotificationsEnabled boolean can be set to true to enable insights notifications through Amazon EventBridge for the group.
        • InsightsEnabled (boolean) --

          Set the InsightsEnabled value to true to enable insights or false to disable insights.

        • NotificationsEnabled (boolean) --

          Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException
update_sampling_rule(**kwargs)

Modifies a sampling rule's configuration.

See also: AWS API Documentation

Request Syntax

response = client.update_sampling_rule(
    SamplingRuleUpdate={
        'RuleName': 'string',
        'RuleARN': 'string',
        'ResourceARN': 'string',
        'Priority': 123,
        'FixedRate': 123.0,
        'ReservoirSize': 123,
        'Host': 'string',
        'ServiceName': 'string',
        'ServiceType': 'string',
        'HTTPMethod': 'string',
        'URLPath': 'string',
        'Attributes': {
            'string': 'string'
        }
    }
)
Parameters
SamplingRuleUpdate (dict) --

[REQUIRED]

The rule and fields to change.

  • RuleName (string) --

    The name of the sampling rule. Specify a rule by either name or ARN, but not both.

  • RuleARN (string) --

    The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.

  • ResourceARN (string) --

    Matches the ARN of the Amazon Web Services resource on which the service runs.

  • Priority (integer) --

    The priority of the sampling rule.

  • FixedRate (float) --

    The percentage of matching requests to instrument, after the reservoir is exhausted.

  • ReservoirSize (integer) --

    A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.

  • Host (string) --

    Matches the hostname from a request URL.

  • ServiceName (string) --

    Matches the name that the service uses to identify itself in segments.

  • ServiceType (string) --

    Matches the origin that the service uses to identify its type in segments.

  • HTTPMethod (string) --

    Matches the HTTP method of a request.

  • URLPath (string) --

    Matches the path from a request URL.

  • Attributes (dict) --

    Matches attributes derived from the request.

    • (string) --
      • (string) --
Return type
dict
Returns
Response Syntax
{
    'SamplingRuleRecord': {
        'SamplingRule': {
            'RuleName': 'string',
            'RuleARN': 'string',
            'ResourceARN': 'string',
            'Priority': 123,
            'FixedRate': 123.0,
            'ReservoirSize': 123,
            'ServiceName': 'string',
            'ServiceType': 'string',
            'Host': 'string',
            'HTTPMethod': 'string',
            'URLPath': 'string',
            'Version': 123,
            'Attributes': {
                'string': 'string'
            }
        },
        'CreatedAt': datetime(2015, 1, 1),
        'ModifiedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --
    • SamplingRuleRecord (dict) --

      The updated rule definition and metadata.

      • SamplingRule (dict) --

        The sampling rule.

        • RuleName (string) --

          The name of the sampling rule. Specify a rule by either name or ARN, but not both.

        • RuleARN (string) --

          The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.

        • ResourceARN (string) --

          Matches the ARN of the Amazon Web Services resource on which the service runs.

        • Priority (integer) --

          The priority of the sampling rule.

        • FixedRate (float) --

          The percentage of matching requests to instrument, after the reservoir is exhausted.

        • ReservoirSize (integer) --

          A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.

        • ServiceName (string) --

          Matches the name that the service uses to identify itself in segments.

        • ServiceType (string) --

          Matches the origin that the service uses to identify its type in segments.

        • Host (string) --

          Matches the hostname from a request URL.

        • HTTPMethod (string) --

          Matches the HTTP method of a request.

        • URLPath (string) --

          Matches the path from a request URL.

        • Version (integer) --

          The version of the sampling rule format (1 ).

        • Attributes (dict) --

          Matches attributes derived from the request.

          • (string) --
            • (string) --
      • CreatedAt (datetime) --

        When the rule was created.

      • ModifiedAt (datetime) --

        When the rule was last modified.

Exceptions

  • XRay.Client.exceptions.InvalidRequestException
  • XRay.Client.exceptions.ThrottledException

Paginators

The available paginators are:

class XRay.Paginator.BatchGetTraces
paginator = client.get_paginator('batch_get_traces')
paginate(**kwargs)

Creates an iterator that will paginate through responses from XRay.Client.batch_get_traces().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TraceIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TraceIds (list) --

    [REQUIRED]

    Specify the trace IDs of requests for which to retrieve segments.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Traces': [
        {
            'Id': 'string',
            'Duration': 123.0,
            'LimitExceeded': True|False,
            'Segments': [
                {
                    'Id': 'string',
                    'Document': 'string'
                },
            ]
        },
    ],
    'UnprocessedTraceIds': [
        'string',
    ],

}

Response Structure

  • (dict) --

    • Traces (list) --

      Full traces for the specified requests.

      • (dict) --

        A collection of segment documents with matching trace IDs.

        • Id (string) --

          The unique identifier for the request that generated the trace's segments and subsegments.

        • Duration (float) --

          The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.

        • LimitExceeded (boolean) --

          LimitExceeded is set to true when the trace has exceeded one of the defined quotas. For more information about quotas, see Amazon Web Services X-Ray endpoints and quotas .

        • Segments (list) --

          Segment documents for the segments and subsegments that comprise the trace.

          • (dict) --

            A segment from a trace that has been ingested by the X-Ray service. The segment can be compiled from documents uploaded with PutTraceSegments , or an inferred segment for a downstream service, generated from a subsegment sent by the service that called it.

            For the full segment document schema, see Amazon Web Services X-Ray Segment Documents in the Amazon Web Services X-Ray Developer Guide .

            • Id (string) --

              The segment's ID.

            • Document (string) --

              The segment document.

    • UnprocessedTraceIds (list) --

      Trace IDs of requests that haven't been processed.

      • (string) --

class XRay.Paginator.GetGroups
paginator = client.get_paginator('get_groups')
paginate(**kwargs)

Creates an iterator that will paginate through responses from XRay.Client.get_groups().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PaginationConfig={
        'MaxItems': 123,
        'StartingToken': 'string'
    }
)
Parameters
PaginationConfig (dict) --

A dictionary that provides parameters to control pagination.

  • MaxItems (integer) --

    The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

  • StartingToken (string) --

    A token to specify where to start paginating. This is the NextToken from a previous response.

Return type
dict
Returns
Response Syntax
{
    'Groups': [
        {
            'GroupName': 'string',
            'GroupARN': 'string',
            'FilterExpression': 'string',
            'InsightsConfiguration': {
                'InsightsEnabled': True|False,
                'NotificationsEnabled': True|False
            }
        },
    ],

}

Response Structure

  • (dict) --
    • Groups (list) --

      The collection of all active groups.

      • (dict) --

        Details for a group without metadata.

        • GroupName (string) --

          The unique case-sensitive name of the group.

        • GroupARN (string) --

          The ARN of the group generated based on the GroupName.

        • FilterExpression (string) --

          The filter expression defining the parameters to include traces.

        • InsightsConfiguration (dict) --

          The structure containing configurations related to insights.

          • The InsightsEnabled boolean can be set to true to enable insights for the group or false to disable insights for the group.
          • The NotificationsEnabled boolean can be set to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.
          • InsightsEnabled (boolean) --

            Set the InsightsEnabled value to true to enable insights or false to disable insights.

          • NotificationsEnabled (boolean) --

            Set the NotificationsEnabled value to true to enable insights notifications. Notifications can only be enabled on a group with InsightsEnabled set to true.

class XRay.Paginator.GetSamplingRules
paginator = client.get_paginator('get_sampling_rules')
paginate(**kwargs)

Creates an iterator that will paginate through responses from XRay.Client.get_sampling_rules().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PaginationConfig={
        'MaxItems': 123,
        'StartingToken': 'string'
    }
)
Parameters
PaginationConfig (dict) --

A dictionary that provides parameters to control pagination.

  • MaxItems (integer) --

    The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

  • StartingToken (string) --

    A token to specify where to start paginating. This is the NextToken from a previous response.

Return type
dict
Returns
Response Syntax
{
    'SamplingRuleRecords': [
        {
            'SamplingRule': {
                'RuleName': 'string',
                'RuleARN': 'string',
                'ResourceARN': 'string',
                'Priority': 123,
                'FixedRate': 123.0,
                'ReservoirSize': 123,
                'ServiceName': 'string',
                'ServiceType': 'string',
                'Host': 'string',
                'HTTPMethod': 'string',
                'URLPath': 'string',
                'Version': 123,
                'Attributes': {
                    'string': 'string'
                }
            },
            'CreatedAt': datetime(2015, 1, 1),
            'ModifiedAt': datetime(2015, 1, 1)
        },
    ],

}

Response Structure

  • (dict) --
    • SamplingRuleRecords (list) --

      Rule definitions and metadata.

      • (dict) --

        A SamplingRule and its metadata.

        • SamplingRule (dict) --

          The sampling rule.

          • RuleName (string) --

            The name of the sampling rule. Specify a rule by either name or ARN, but not both.

          • RuleARN (string) --

            The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.

          • ResourceARN (string) --

            Matches the ARN of the Amazon Web Services resource on which the service runs.

          • Priority (integer) --

            The priority of the sampling rule.

          • FixedRate (float) --

            The percentage of matching requests to instrument, after the reservoir is exhausted.

          • ReservoirSize (integer) --

            A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.

          • ServiceName (string) --

            Matches the name that the service uses to identify itself in segments.

          • ServiceType (string) --

            Matches the origin that the service uses to identify its type in segments.

          • Host (string) --

            Matches the hostname from a request URL.

          • HTTPMethod (string) --

            Matches the HTTP method of a request.

          • URLPath (string) --

            Matches the path from a request URL.

          • Version (integer) --

            The version of the sampling rule format (1 ).

          • Attributes (dict) --

            Matches attributes derived from the request.

            • (string) --
              • (string) --
        • CreatedAt (datetime) --

          When the rule was created.

        • ModifiedAt (datetime) --

          When the rule was last modified.

class XRay.Paginator.GetSamplingStatisticSummaries
paginator = client.get_paginator('get_sampling_statistic_summaries')
paginate(**kwargs)

Creates an iterator that will paginate through responses from XRay.Client.get_sampling_statistic_summaries().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    PaginationConfig={
        'MaxItems': 123,
        'StartingToken': 'string'
    }
)
Parameters
PaginationConfig (dict) --

A dictionary that provides parameters to control pagination.

  • MaxItems (integer) --

    The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

  • StartingToken (string) --

    A token to specify where to start paginating. This is the NextToken from a previous response.

Return type
dict
Returns
Response Syntax
{
    'SamplingStatisticSummaries': [
        {
            'RuleName': 'string',
            'Timestamp': datetime(2015, 1, 1),
            'RequestCount': 123,
            'BorrowCount': 123,
            'SampledCount': 123
        },
    ],

}

Response Structure

  • (dict) --
    • SamplingStatisticSummaries (list) --

      Information about the number of requests instrumented for each sampling rule.

      • (dict) --

        Aggregated request sampling data for a sampling rule across all services for a 10-second window.

        • RuleName (string) --

          The name of the sampling rule.

        • Timestamp (datetime) --

          The start time of the reporting window.

        • RequestCount (integer) --

          The number of requests that matched the rule.

        • BorrowCount (integer) --

          The number of requests recorded with borrowed reservoir quota.

        • SampledCount (integer) --

          The number of requests recorded.

class XRay.Paginator.GetServiceGraph
paginator = client.get_paginator('get_service_graph')
paginate(**kwargs)

Creates an iterator that will paginate through responses from XRay.Client.get_service_graph().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    GroupName='string',
    GroupARN='string',
    PaginationConfig={
        'MaxItems': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • StartTime (datetime) --

    [REQUIRED]

    The start of the time frame for which to generate a graph.

  • EndTime (datetime) --

    [REQUIRED]

    The end of the timeframe for which to generate a graph.

  • GroupName (string) -- The name of a group based on which you want to generate a graph.
  • GroupARN (string) -- The Amazon Resource Name (ARN) of a group based on which you want to generate a graph.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'StartTime': datetime(2015, 1, 1),
    'EndTime': datetime(2015, 1, 1),
    'Services': [
        {
            'ReferenceId': 123,
            'Name': 'string',
            'Names': [
                'string',
            ],
            'Root': True|False,
            'AccountId': 'string',
            'Type': 'string',
            'State': 'string',
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'Edges': [
                {
                    'ReferenceId': 123,
                    'StartTime': datetime(2015, 1, 1),
                    'EndTime': datetime(2015, 1, 1),
                    'SummaryStatistics': {
                        'OkCount': 123,
                        'ErrorStatistics': {
                            'ThrottleCount': 123,
                            'OtherCount': 123,
                            'TotalCount': 123
                        },
                        'FaultStatistics': {
                            'OtherCount': 123,
                            'TotalCount': 123
                        },
                        'TotalCount': 123,
                        'TotalResponseTime': 123.0
                    },
                    'ResponseTimeHistogram': [
                        {
                            'Value': 123.0,
                            'Count': 123
                        },
                    ],
                    'Aliases': [
                        {
                            'Name': 'string',
                            'Names': [
                                'string',
                            ],
                            'Type': 'string'
                        },
                    ]
                },
            ],
            'SummaryStatistics': {
                'OkCount': 123,
                'ErrorStatistics': {
                    'ThrottleCount': 123,
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'FaultStatistics': {
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'TotalCount': 123,
                'TotalResponseTime': 123.0
            },
            'DurationHistogram': [
                {
                    'Value': 123.0,
                    'Count': 123
                },
            ],
            'ResponseTimeHistogram': [
                {
                    'Value': 123.0,
                    'Count': 123
                },
            ]
        },
    ],
    'ContainsOldGroupVersions': True|False,

}

Response Structure

  • (dict) --

    • StartTime (datetime) --

      The start of the time frame for which the graph was generated.

    • EndTime (datetime) --

      The end of the time frame for which the graph was generated.

    • Services (list) --

      The services that have processed a traced request during the specified time frame.

      • (dict) --

        Information about an application that processed requests, users that made requests, or downstream services, resources, and applications that an application used.

        • ReferenceId (integer) --

          Identifier for the service. Unique within the service map.

        • Name (string) --

          The canonical name of the service.

        • Names (list) --

          A list of names for the service, including the canonical name.

          • (string) --
        • Root (boolean) --

          Indicates that the service was the first service to process a request.

        • AccountId (string) --

          Identifier of the Amazon Web Services account in which the service runs.

        • Type (string) --

          The type of service.

          • Amazon Web Services Resource - The type of an Amazon Web Services resource. For example, AWS::EC2::Instance for an application running on Amazon EC2 or AWS::DynamoDB::Table for an Amazon DynamoDB table that the application used.
          • Amazon Web Services Service - The type of an Amazon Web Services service. For example, AWS::DynamoDB for downstream calls to Amazon DynamoDB that didn't target a specific table.
          • client - Represents the clients that sent requests to a root service.
          • remote - A downstream service of indeterminate type.
        • State (string) --

          The service's state.

        • StartTime (datetime) --

          The start time of the first segment that the service generated.

        • EndTime (datetime) --

          The end time of the last segment that the service generated.

        • Edges (list) --

          Connections to downstream services.

          • (dict) --

            Information about a connection between two services.

            • ReferenceId (integer) --

              Identifier of the edge. Unique within a service map.

            • StartTime (datetime) --

              The start time of the first segment on the edge.

            • EndTime (datetime) --

              The end time of the last segment on the edge.

            • SummaryStatistics (dict) --

              Response statistics for segments on the edge.

              • OkCount (integer) --

                The number of requests that completed with a 2xx Success status code.

              • ErrorStatistics (dict) --

                Information about requests that failed with a 4xx Client Error status code.

                • ThrottleCount (integer) --

                  The number of requests that failed with a 419 throttling status code.

                • OtherCount (integer) --

                  The number of requests that failed with untracked 4xx Client Error status codes.

                • TotalCount (integer) --

                  The total number of requests that failed with a 4xx Client Error status code.

              • FaultStatistics (dict) --

                Information about requests that failed with a 5xx Server Error status code.

                • OtherCount (integer) --

                  The number of requests that failed with untracked 5xx Server Error status codes.

                • TotalCount (integer) --

                  The total number of requests that failed with a 5xx Server Error status code.

              • TotalCount (integer) --

                The total number of completed requests.

              • TotalResponseTime (float) --

                The aggregate response time of completed requests.

            • ResponseTimeHistogram (list) --

              A histogram that maps the spread of client response times on an edge.

              • (dict) --

                An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

                • Value (float) --

                  The value of the entry.

                • Count (integer) --

                  The prevalence of the entry.

            • Aliases (list) --

              Aliases for the edge.

              • (dict) --

                An alias for an edge.

                • Name (string) --

                  The canonical name of the alias.

                • Names (list) --

                  A list of names for the alias, including the canonical name.

                  • (string) --
                • Type (string) --

                  The type of the alias.

        • SummaryStatistics (dict) --

          Aggregated statistics for the service.

          • OkCount (integer) --

            The number of requests that completed with a 2xx Success status code.

          • ErrorStatistics (dict) --

            Information about requests that failed with a 4xx Client Error status code.

            • ThrottleCount (integer) --

              The number of requests that failed with a 419 throttling status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 4xx Client Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 4xx Client Error status code.

          • FaultStatistics (dict) --

            Information about requests that failed with a 5xx Server Error status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 5xx Server Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 5xx Server Error status code.

          • TotalCount (integer) --

            The total number of completed requests.

          • TotalResponseTime (float) --

            The aggregate response time of completed requests.

        • DurationHistogram (list) --

          A histogram that maps the spread of service durations.

          • (dict) --

            An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

            • Value (float) --

              The value of the entry.

            • Count (integer) --

              The prevalence of the entry.

        • ResponseTimeHistogram (list) --

          A histogram that maps the spread of service response times.

          • (dict) --

            An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

            • Value (float) --

              The value of the entry.

            • Count (integer) --

              The prevalence of the entry.

    • ContainsOldGroupVersions (boolean) --

      A flag indicating whether the group's filter expression has been consistent, or if the returned service graph may show traces from an older version of the group's filter expression.

class XRay.Paginator.GetTimeSeriesServiceStatistics
paginator = client.get_paginator('get_time_series_service_statistics')
paginate(**kwargs)

Creates an iterator that will paginate through responses from XRay.Client.get_time_series_service_statistics().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    GroupName='string',
    GroupARN='string',
    EntitySelectorExpression='string',
    Period=123,
    ForecastStatistics=True|False,
    PaginationConfig={
        'MaxItems': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • StartTime (datetime) --

    [REQUIRED]

    The start of the time frame for which to aggregate statistics.

  • EndTime (datetime) --

    [REQUIRED]

    The end of the time frame for which to aggregate statistics.

  • GroupName (string) -- The case-sensitive name of the group for which to pull statistics from.
  • GroupARN (string) -- The Amazon Resource Name (ARN) of the group for which to pull statistics from.
  • EntitySelectorExpression (string) -- A filter expression defining entities that will be aggregated for statistics. Supports ID, service, and edge functions. If no selector expression is specified, edge statistics are returned.
  • Period (integer) -- Aggregation period in seconds.
  • ForecastStatistics (boolean) -- The forecasted high and low fault count values. Forecast enabled requests require the EntitySelectorExpression ID be provided.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TimeSeriesServiceStatistics': [
        {
            'Timestamp': datetime(2015, 1, 1),
            'EdgeSummaryStatistics': {
                'OkCount': 123,
                'ErrorStatistics': {
                    'ThrottleCount': 123,
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'FaultStatistics': {
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'TotalCount': 123,
                'TotalResponseTime': 123.0
            },
            'ServiceSummaryStatistics': {
                'OkCount': 123,
                'ErrorStatistics': {
                    'ThrottleCount': 123,
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'FaultStatistics': {
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'TotalCount': 123,
                'TotalResponseTime': 123.0
            },
            'ServiceForecastStatistics': {
                'FaultCountHigh': 123,
                'FaultCountLow': 123
            },
            'ResponseTimeHistogram': [
                {
                    'Value': 123.0,
                    'Count': 123
                },
            ]
        },
    ],
    'ContainsOldGroupVersions': True|False,

}

Response Structure

  • (dict) --

    • TimeSeriesServiceStatistics (list) --

      The collection of statistics.

      • (dict) --

        A list of TimeSeriesStatistic structures.

        • Timestamp (datetime) --

          Timestamp of the window for which statistics are aggregated.

        • EdgeSummaryStatistics (dict) --

          Response statistics for an edge.

          • OkCount (integer) --

            The number of requests that completed with a 2xx Success status code.

          • ErrorStatistics (dict) --

            Information about requests that failed with a 4xx Client Error status code.

            • ThrottleCount (integer) --

              The number of requests that failed with a 419 throttling status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 4xx Client Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 4xx Client Error status code.

          • FaultStatistics (dict) --

            Information about requests that failed with a 5xx Server Error status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 5xx Server Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 5xx Server Error status code.

          • TotalCount (integer) --

            The total number of completed requests.

          • TotalResponseTime (float) --

            The aggregate response time of completed requests.

        • ServiceSummaryStatistics (dict) --

          Response statistics for a service.

          • OkCount (integer) --

            The number of requests that completed with a 2xx Success status code.

          • ErrorStatistics (dict) --

            Information about requests that failed with a 4xx Client Error status code.

            • ThrottleCount (integer) --

              The number of requests that failed with a 419 throttling status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 4xx Client Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 4xx Client Error status code.

          • FaultStatistics (dict) --

            Information about requests that failed with a 5xx Server Error status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 5xx Server Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 5xx Server Error status code.

          • TotalCount (integer) --

            The total number of completed requests.

          • TotalResponseTime (float) --

            The aggregate response time of completed requests.

        • ServiceForecastStatistics (dict) --

          The forecasted high and low fault count values.

          • FaultCountHigh (integer) --

            The upper limit of fault counts for a service.

          • FaultCountLow (integer) --

            The lower limit of fault counts for a service.

        • ResponseTimeHistogram (list) --

          The response time histogram for the selected entities.

          • (dict) --

            An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

            • Value (float) --

              The value of the entry.

            • Count (integer) --

              The prevalence of the entry.

    • ContainsOldGroupVersions (boolean) --

      A flag indicating whether or not a group's filter expression has been consistent, or if a returned aggregation might show statistics from an older version of the group's filter expression.

class XRay.Paginator.GetTraceGraph
paginator = client.get_paginator('get_trace_graph')
paginate(**kwargs)

Creates an iterator that will paginate through responses from XRay.Client.get_trace_graph().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    TraceIds=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • TraceIds (list) --

    [REQUIRED]

    Trace IDs of requests for which to generate a service graph.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Services': [
        {
            'ReferenceId': 123,
            'Name': 'string',
            'Names': [
                'string',
            ],
            'Root': True|False,
            'AccountId': 'string',
            'Type': 'string',
            'State': 'string',
            'StartTime': datetime(2015, 1, 1),
            'EndTime': datetime(2015, 1, 1),
            'Edges': [
                {
                    'ReferenceId': 123,
                    'StartTime': datetime(2015, 1, 1),
                    'EndTime': datetime(2015, 1, 1),
                    'SummaryStatistics': {
                        'OkCount': 123,
                        'ErrorStatistics': {
                            'ThrottleCount': 123,
                            'OtherCount': 123,
                            'TotalCount': 123
                        },
                        'FaultStatistics': {
                            'OtherCount': 123,
                            'TotalCount': 123
                        },
                        'TotalCount': 123,
                        'TotalResponseTime': 123.0
                    },
                    'ResponseTimeHistogram': [
                        {
                            'Value': 123.0,
                            'Count': 123
                        },
                    ],
                    'Aliases': [
                        {
                            'Name': 'string',
                            'Names': [
                                'string',
                            ],
                            'Type': 'string'
                        },
                    ]
                },
            ],
            'SummaryStatistics': {
                'OkCount': 123,
                'ErrorStatistics': {
                    'ThrottleCount': 123,
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'FaultStatistics': {
                    'OtherCount': 123,
                    'TotalCount': 123
                },
                'TotalCount': 123,
                'TotalResponseTime': 123.0
            },
            'DurationHistogram': [
                {
                    'Value': 123.0,
                    'Count': 123
                },
            ],
            'ResponseTimeHistogram': [
                {
                    'Value': 123.0,
                    'Count': 123
                },
            ]
        },
    ],

}

Response Structure

  • (dict) --

    • Services (list) --

      The services that have processed one of the specified requests.

      • (dict) --

        Information about an application that processed requests, users that made requests, or downstream services, resources, and applications that an application used.

        • ReferenceId (integer) --

          Identifier for the service. Unique within the service map.

        • Name (string) --

          The canonical name of the service.

        • Names (list) --

          A list of names for the service, including the canonical name.

          • (string) --
        • Root (boolean) --

          Indicates that the service was the first service to process a request.

        • AccountId (string) --

          Identifier of the Amazon Web Services account in which the service runs.

        • Type (string) --

          The type of service.

          • Amazon Web Services Resource - The type of an Amazon Web Services resource. For example, AWS::EC2::Instance for an application running on Amazon EC2 or AWS::DynamoDB::Table for an Amazon DynamoDB table that the application used.
          • Amazon Web Services Service - The type of an Amazon Web Services service. For example, AWS::DynamoDB for downstream calls to Amazon DynamoDB that didn't target a specific table.
          • client - Represents the clients that sent requests to a root service.
          • remote - A downstream service of indeterminate type.
        • State (string) --

          The service's state.

        • StartTime (datetime) --

          The start time of the first segment that the service generated.

        • EndTime (datetime) --

          The end time of the last segment that the service generated.

        • Edges (list) --

          Connections to downstream services.

          • (dict) --

            Information about a connection between two services.

            • ReferenceId (integer) --

              Identifier of the edge. Unique within a service map.

            • StartTime (datetime) --

              The start time of the first segment on the edge.

            • EndTime (datetime) --

              The end time of the last segment on the edge.

            • SummaryStatistics (dict) --

              Response statistics for segments on the edge.

              • OkCount (integer) --

                The number of requests that completed with a 2xx Success status code.

              • ErrorStatistics (dict) --

                Information about requests that failed with a 4xx Client Error status code.

                • ThrottleCount (integer) --

                  The number of requests that failed with a 419 throttling status code.

                • OtherCount (integer) --

                  The number of requests that failed with untracked 4xx Client Error status codes.

                • TotalCount (integer) --

                  The total number of requests that failed with a 4xx Client Error status code.

              • FaultStatistics (dict) --

                Information about requests that failed with a 5xx Server Error status code.

                • OtherCount (integer) --

                  The number of requests that failed with untracked 5xx Server Error status codes.

                • TotalCount (integer) --

                  The total number of requests that failed with a 5xx Server Error status code.

              • TotalCount (integer) --

                The total number of completed requests.

              • TotalResponseTime (float) --

                The aggregate response time of completed requests.

            • ResponseTimeHistogram (list) --

              A histogram that maps the spread of client response times on an edge.

              • (dict) --

                An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

                • Value (float) --

                  The value of the entry.

                • Count (integer) --

                  The prevalence of the entry.

            • Aliases (list) --

              Aliases for the edge.

              • (dict) --

                An alias for an edge.

                • Name (string) --

                  The canonical name of the alias.

                • Names (list) --

                  A list of names for the alias, including the canonical name.

                  • (string) --
                • Type (string) --

                  The type of the alias.

        • SummaryStatistics (dict) --

          Aggregated statistics for the service.

          • OkCount (integer) --

            The number of requests that completed with a 2xx Success status code.

          • ErrorStatistics (dict) --

            Information about requests that failed with a 4xx Client Error status code.

            • ThrottleCount (integer) --

              The number of requests that failed with a 419 throttling status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 4xx Client Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 4xx Client Error status code.

          • FaultStatistics (dict) --

            Information about requests that failed with a 5xx Server Error status code.

            • OtherCount (integer) --

              The number of requests that failed with untracked 5xx Server Error status codes.

            • TotalCount (integer) --

              The total number of requests that failed with a 5xx Server Error status code.

          • TotalCount (integer) --

            The total number of completed requests.

          • TotalResponseTime (float) --

            The aggregate response time of completed requests.

        • DurationHistogram (list) --

          A histogram that maps the spread of service durations.

          • (dict) --

            An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

            • Value (float) --

              The value of the entry.

            • Count (integer) --

              The prevalence of the entry.

        • ResponseTimeHistogram (list) --

          A histogram that maps the spread of service response times.

          • (dict) --

            An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis.

            • Value (float) --

              The value of the entry.

            • Count (integer) --

              The prevalence of the entry.

class XRay.Paginator.GetTraceSummaries
paginator = client.get_paginator('get_trace_summaries')
paginate(**kwargs)

Creates an iterator that will paginate through responses from XRay.Client.get_trace_summaries().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    StartTime=datetime(2015, 1, 1),
    EndTime=datetime(2015, 1, 1),
    TimeRangeType='TraceId'|'Event',
    Sampling=True|False,
    SamplingStrategy={
        'Name': 'PartialScan'|'FixedRate',
        'Value': 123.0
    },
    FilterExpression='string',
    PaginationConfig={
        'MaxItems': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • StartTime (datetime) --

    [REQUIRED]

    The start of the time frame for which to retrieve traces.

  • EndTime (datetime) --

    [REQUIRED]

    The end of the time frame for which to retrieve traces.

  • TimeRangeType (string) -- A parameter to indicate whether to query trace summaries by TraceId or Event time.
  • Sampling (boolean) -- Set to true to get summaries for only a subset of available traces.
  • SamplingStrategy (dict) --

    A parameter to indicate whether to enable sampling on trace summaries. Input parameters are Name and Value.

    • Name (string) --

      The name of a sampling rule.

    • Value (float) --

      The value of a sampling rule.

  • FilterExpression (string) -- Specify a filter expression to retrieve trace summaries for services or requests that meet certain requirements.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'TraceSummaries': [
        {
            'Id': 'string',
            'Duration': 123.0,
            'ResponseTime': 123.0,
            'HasFault': True|False,
            'HasError': True|False,
            'HasThrottle': True|False,
            'IsPartial': True|False,
            'Http': {
                'HttpURL': 'string',
                'HttpStatus': 123,
                'HttpMethod': 'string',
                'UserAgent': 'string',
                'ClientIp': 'string'
            },
            'Annotations': {
                'string': [
                    {
                        'AnnotationValue': {
                            'NumberValue': 123.0,
                            'BooleanValue': True|False,
                            'StringValue': 'string'
                        },
                        'ServiceIds': [
                            {
                                'Name': 'string',
                                'Names': [
                                    'string',
                                ],
                                'AccountId': 'string',
                                'Type': 'string'
                            },
                        ]
                    },
                ]
            },
            'Users': [
                {
                    'UserName': 'string',
                    'ServiceIds': [
                        {
                            'Name': 'string',
                            'Names': [
                                'string',
                            ],
                            'AccountId': 'string',
                            'Type': 'string'
                        },
                    ]
                },
            ],
            'ServiceIds': [
                {
                    'Name': 'string',
                    'Names': [
                        'string',
                    ],
                    'AccountId': 'string',
                    'Type': 'string'
                },
            ],
            'ResourceARNs': [
                {
                    'ARN': 'string'
                },
            ],
            'InstanceIds': [
                {
                    'Id': 'string'
                },
            ],
            'AvailabilityZones': [
                {
                    'Name': 'string'
                },
            ],
            'EntryPoint': {
                'Name': 'string',
                'Names': [
                    'string',
                ],
                'AccountId': 'string',
                'Type': 'string'
            },
            'FaultRootCauses': [
                {
                    'Services': [
                        {
                            'Name': 'string',
                            'Names': [
                                'string',
                            ],
                            'Type': 'string',
                            'AccountId': 'string',
                            'EntityPath': [
                                {
                                    'Name': 'string',
                                    'Exceptions': [
                                        {
                                            'Name': 'string',
                                            'Message': 'string'
                                        },
                                    ],
                                    'Remote': True|False
                                },
                            ],
                            'Inferred': True|False
                        },
                    ],
                    'ClientImpacting': True|False
                },
            ],
            'ErrorRootCauses': [
                {
                    'Services': [
                        {
                            'Name': 'string',
                            'Names': [
                                'string',
                            ],
                            'Type': 'string',
                            'AccountId': 'string',
                            'EntityPath': [
                                {
                                    'Name': 'string',
                                    'Exceptions': [
                                        {
                                            'Name': 'string',
                                            'Message': 'string'
                                        },
                                    ],
                                    'Remote': True|False
                                },
                            ],
                            'Inferred': True|False
                        },
                    ],
                    'ClientImpacting': True|False
                },
            ],
            'ResponseTimeRootCauses': [
                {
                    'Services': [
                        {
                            'Name': 'string',
                            'Names': [
                                'string',
                            ],
                            'Type': 'string',
                            'AccountId': 'string',
                            'EntityPath': [
                                {
                                    'Name': 'string',
                                    'Coverage': 123.0,
                                    'Remote': True|False
                                },
                            ],
                            'Inferred': True|False
                        },
                    ],
                    'ClientImpacting': True|False
                },
            ],
            'Revision': 123,
            'MatchedEventTime': datetime(2015, 1, 1)
        },
    ],
    'ApproximateTime': datetime(2015, 1, 1),
    'TracesProcessedCount': 123,

}

Response Structure

  • (dict) --

    • TraceSummaries (list) --

      Trace IDs and annotations for traces that were found in the specified time frame.

      • (dict) --

        Metadata generated from the segment documents in a trace.

        • Id (string) --

          The unique identifier for the request that generated the trace's segments and subsegments.

        • Duration (float) --

          The length of time in seconds between the start time of the root segment and the end time of the last segment that completed.

        • ResponseTime (float) --

          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.

        • HasFault (boolean) --

          The root segment document has a 500 series error.

        • HasError (boolean) --

          The root segment document has a 400 series error.

        • HasThrottle (boolean) --

          One or more of the segment documents has a 429 throttling error.

        • IsPartial (boolean) --

          One or more of the segment documents is in progress.

        • Http (dict) --

          Information about the HTTP request served by the trace.

          • HttpURL (string) --

            The request URL.

          • HttpStatus (integer) --

            The response status.

          • HttpMethod (string) --

            The request method.

          • UserAgent (string) --

            The request's user agent string.

          • ClientIp (string) --

            The IP address of the requestor.

        • Annotations (dict) --

          Annotations from the trace's segment documents.

          • (string) --

            • (list) --

              • (dict) --

                Information about a segment annotation.

                • AnnotationValue (dict) --

                  Values of the annotation.

                  • NumberValue (float) --

                    Value for a Number annotation.

                  • BooleanValue (boolean) --

                    Value for a Boolean annotation.

                  • StringValue (string) --

                    Value for a String annotation.

                • ServiceIds (list) --

                  Services to which the annotation applies.

                  • (dict) --
                    • Name (string) --
                    • Names (list) --
                      • (string) --
                    • AccountId (string) --
                    • Type (string) --
        • Users (list) --

          Users from the trace's segment documents.

          • (dict) --

            Information about a user recorded in segment documents.

            • UserName (string) --

              The user's name.

            • ServiceIds (list) --

              Services that the user's request hit.

              • (dict) --
                • Name (string) --
                • Names (list) --
                  • (string) --
                • AccountId (string) --
                • Type (string) --
        • ServiceIds (list) --

          Service IDs from the trace's segment documents.

          • (dict) --
            • Name (string) --
            • Names (list) --
              • (string) --
            • AccountId (string) --
            • Type (string) --
        • ResourceARNs (list) --

          A list of resource ARNs for any resource corresponding to the trace segments.

          • (dict) --

            A list of resources ARNs corresponding to the segments in a trace.

            • ARN (string) --

              The ARN of a corresponding resource.

        • InstanceIds (list) --

          A list of EC2 instance IDs for any instance corresponding to the trace segments.

          • (dict) --

            A list of EC2 instance IDs corresponding to the segments in a trace.

            • Id (string) --

              The ID of a corresponding EC2 instance.

        • AvailabilityZones (list) --

          A list of Availability Zones for any zone corresponding to the trace segments.

          • (dict) --

            A list of Availability Zones corresponding to the segments in a trace.

            • Name (string) --

              The name of a corresponding Availability Zone.

        • EntryPoint (dict) --

          The root of a trace.

          • Name (string) --
          • Names (list) --
            • (string) --
          • AccountId (string) --
          • Type (string) --
        • FaultRootCauses (list) --

          A collection of FaultRootCause structures corresponding to the trace segments.

          • (dict) --

            The root cause information for a trace summary fault.

            • Services (list) --

              A list of corresponding services. A service identifies a segment and it contains a name, account ID, type, and inferred flag.

              • (dict) --

                A collection of fields identifying the services in a trace summary fault.

                • Name (string) --

                  The service name.

                • Names (list) --

                  A collection of associated service names.

                  • (string) --
                • Type (string) --

                  The type associated to the service.

                • AccountId (string) --

                  The account ID associated to the service.

                • EntityPath (list) --

                  The path of root cause entities found on the service.

                  • (dict) --

                    A collection of segments and corresponding subsegments associated to a trace summary fault error.

                    • Name (string) --

                      The name of the entity.

                    • Exceptions (list) --

                      The types and messages of the exceptions.

                      • (dict) --

                        The exception associated with a root cause.

                        • Name (string) --

                          The name of the exception.

                        • Message (string) --

                          The message of the exception.

                    • Remote (boolean) --

                      A flag that denotes a remote subsegment.

                • Inferred (boolean) --

                  A Boolean value indicating if the service is inferred from the trace.

            • ClientImpacting (boolean) --

              A flag that denotes that the root cause impacts the trace client.

        • ErrorRootCauses (list) --

          A collection of ErrorRootCause structures corresponding to the trace segments.

          • (dict) --

            The root cause of a trace summary error.

            • Services (list) --

              A list of services corresponding to an error. A service identifies a segment and it contains a name, account ID, type, and inferred flag.

              • (dict) --

                A collection of fields identifying the services in a trace summary error.

                • Name (string) --

                  The service name.

                • Names (list) --

                  A collection of associated service names.

                  • (string) --
                • Type (string) --

                  The type associated to the service.

                • AccountId (string) --

                  The account ID associated to the service.

                • EntityPath (list) --

                  The path of root cause entities found on the service.

                  • (dict) --

                    A collection of segments and corresponding subsegments associated to a trace summary error.

                    • Name (string) --

                      The name of the entity.

                    • Exceptions (list) --

                      The types and messages of the exceptions.

                      • (dict) --

                        The exception associated with a root cause.

                        • Name (string) --

                          The name of the exception.

                        • Message (string) --

                          The message of the exception.

                    • Remote (boolean) --

                      A flag that denotes a remote subsegment.

                • Inferred (boolean) --

                  A Boolean value indicating if the service is inferred from the trace.

            • ClientImpacting (boolean) --

              A flag that denotes that the root cause impacts the trace client.

        • ResponseTimeRootCauses (list) --

          A collection of ResponseTimeRootCause structures corresponding to the trace segments.

          • (dict) --

            The root cause information for a response time warning.

            • Services (list) --

              A list of corresponding services. A service identifies a segment and contains a name, account ID, type, and inferred flag.

              • (dict) --

                A collection of fields identifying the service in a response time warning.

                • Name (string) --

                  The service name.

                • Names (list) --

                  A collection of associated service names.

                  • (string) --
                • Type (string) --

                  The type associated to the service.

                • AccountId (string) --

                  The account ID associated to the service.

                • EntityPath (list) --

                  The path of root cause entities found on the service.

                  • (dict) --

                    A collection of segments and corresponding subsegments associated to a response time warning.

                    • Name (string) --

                      The name of the entity.

                    • Coverage (float) --

                      The type and messages of the exceptions.

                    • Remote (boolean) --

                      A flag that denotes a remote subsegment.

                • Inferred (boolean) --

                  A Boolean value indicating if the service is inferred from the trace.

            • ClientImpacting (boolean) --

              A flag that denotes that the root cause impacts the trace client.

        • Revision (integer) --

          The revision number of a trace.

        • MatchedEventTime (datetime) --

          The matched time stamp of a defined event.

    • ApproximateTime (datetime) --

      The start time of this page of results.

    • TracesProcessedCount (integer) --

      The total number of traces processed, including traces that did not match the specified filter expression.