:doc:`XRay <../../xray>` / Client / get_trace_graph

***************
get_trace_graph
***************



.. py:method:: XRay.Client.get_trace_graph(**kwargs)

  

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

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceGraph>`_  


  **Request Syntax**
  ::

    response = client.get_trace_graph(
        TraceIds=[
            'string',
        ],
        NextToken='string'
    )
    
  :type TraceIds: list
  :param TraceIds: **[REQUIRED]** 

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

    

  
    - *(string) --* 

    

  :type NextToken: string
  :param NextToken: 

    Pagination token.

    

  
  
  :rtype: 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'
                              },
                          ],
                          'EdgeType': 'string',
                          'ReceivedEventAgeHistogram': [
                              {
                                  'Value': 123.0,
                                  'Count': 123
                              },
                          ]
                      },
                  ],
                  '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. An edge can be a synchronous connection, such as typical call between client and service, or an asynchronous link, such as a Lambda function which retrieves an event from an SNS queue.

              
              

              - **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 429 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. Only populated for synchronous edges.

                
                

                - *(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.

                    
              
            
              

              - **EdgeType** *(string) --* 

                Describes an asynchronous connection, with a value of ``link``.

                
              

              - **ReceivedEventAgeHistogram** *(list) --* 

                A histogram that maps the spread of event age when received by consumers. Age is calculated each time an event is received. Only populated when *EdgeType* is ``link``.

                
                

                - *(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.

                    
              
            
          
        
          

          - **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 429 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**
  
  *   :py:class:`XRay.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`XRay.Client.exceptions.ThrottledException`

  