The AWS SDK for JavaScript v2 has reached end-of-support.
We recommend that you migrate to AWS SDK for JavaScript v3. For additional details and information on how to migrate, please refer to the announcement.

Class: AWS.XRay

Inherits:
AWS.Service show all
Identifier:
xray
API Version:
2016-04-12
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

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

Sending a Request Using XRay

var xray = new AWS.XRay();
xray.getSamplingTargets(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the XRay object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var xray = new AWS.XRay({apiVersion: '2016-04-12'});

You can also set the API version globally in AWS.config.apiVersions using the xray service identifier:

AWS.config.apiVersions = {
  xray: '2016-04-12',
  // other service API versions
};

var xray = new AWS.XRay();

Version:

  • 2016-04-12

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.XRay(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a XRay object

var xray = new AWS.XRay({apiVersion: '2016-04-12'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.XRay.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.XRay.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.XRay.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

batchGetTraces(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the batchGetTraces operation

var params = {
  TraceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  NextToken: 'STRING_VALUE'
};
xray.batchGetTraces(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • TraceIds — (Array<String>)

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

    • NextToken — (String)

      Pagination token.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Traces — (Array<map>)

        Full traces for the specified requests.

        • 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 the Trace document size limit. For more information about this limit and other X-Ray limits and quotas, see Amazon Web Services X-Ray endpoints and quotas.

        • Segments — (Array<map>)

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

          • Id — (String)

            The segment's ID.

          • Document — (String)

            The segment document.

      • UnprocessedTraceIds — (Array<String>)

        Trace IDs of requests that haven't been processed.

      • NextToken — (String)

        Pagination token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createGroup(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the createGroup operation

var params = {
  GroupName: 'STRING_VALUE', /* required */
  FilterExpression: 'STRING_VALUE',
  InsightsConfiguration: {
    InsightsEnabled: true || false,
    NotificationsEnabled: true || false
  },
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
xray.createGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GroupName — (String)

      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 — (map)

      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 NotificationsEnabled 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 — (Array<map>)

      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.

      • Keyrequired — (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: + - = . _ : /

      • Valuerequired — (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: + - = . _ : /

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Group — (map)

        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 — (map)

          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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createSamplingRule(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the createSamplingRule operation

var params = {
  SamplingRule: { /* required */
    FixedRate: 'NUMBER_VALUE', /* required */
    HTTPMethod: 'STRING_VALUE', /* required */
    Host: 'STRING_VALUE', /* required */
    Priority: 'NUMBER_VALUE', /* required */
    ReservoirSize: 'NUMBER_VALUE', /* required */
    ResourceARN: 'STRING_VALUE', /* required */
    ServiceName: 'STRING_VALUE', /* required */
    ServiceType: 'STRING_VALUE', /* required */
    URLPath: 'STRING_VALUE', /* required */
    Version: 'NUMBER_VALUE', /* required */
    Attributes: {
      '<AttributeKey>': 'STRING_VALUE',
      /* '<AttributeKey>': ... */
    },
    RuleARN: 'STRING_VALUE',
    RuleName: 'STRING_VALUE'
  },
  Tags: [
    {
      Key: 'STRING_VALUE', /* required */
      Value: 'STRING_VALUE' /* required */
    },
    /* more items */
  ]
};
xray.createSamplingRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • SamplingRule — (map)

      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.

      • ResourceARNrequired — (String)

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

      • Priorityrequired — (Integer)

        The priority of the sampling rule.

      • FixedRaterequired — (Float)

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

      • ReservoirSizerequired — (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.

      • ServiceNamerequired — (String)

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

      • ServiceTyperequired — (String)

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

      • Hostrequired — (String)

        Matches the hostname from a request URL.

      • HTTPMethodrequired — (String)

        Matches the HTTP method of a request.

      • URLPathrequired — (String)

        Matches the path from a request URL.

      • Versionrequired — (Integer)

        The version of the sampling rule format (1).

      • Attributes — (map<String>)

        Matches attributes derived from the request.

    • Tags — (Array<map>)

      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.

      • Keyrequired — (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: + - = . _ : /

      • Valuerequired — (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: + - = . _ : /

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SamplingRuleRecord — (map)

        The saved rule definition and metadata.

        • SamplingRule — (map)

          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.

          • ResourceARNrequired — (String)

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

          • Priorityrequired — (Integer)

            The priority of the sampling rule.

          • FixedRaterequired — (Float)

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

          • ReservoirSizerequired — (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.

          • ServiceNamerequired — (String)

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

          • ServiceTyperequired — (String)

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

          • Hostrequired — (String)

            Matches the hostname from a request URL.

          • HTTPMethodrequired — (String)

            Matches the HTTP method of a request.

          • URLPathrequired — (String)

            Matches the path from a request URL.

          • Versionrequired — (Integer)

            The version of the sampling rule format (1).

          • Attributes — (map<String>)

            Matches attributes derived from the request.

        • CreatedAt — (Date)

          When the rule was created.

        • ModifiedAt — (Date)

          When the rule was last modified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteGroup(params = {}, callback) ⇒ AWS.Request

Deletes a group resource.

Service Reference:

Examples:

Calling the deleteGroup operation

var params = {
  GroupARN: 'STRING_VALUE',
  GroupName: 'STRING_VALUE'
};
xray.deleteGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GroupName — (String)

      The case-sensitive name of the group.

    • GroupARN — (String)

      The ARN of the group that was generated on creation.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteResourcePolicy(params = {}, callback) ⇒ AWS.Request

Deletes a resource policy from the target Amazon Web Services account.

Service Reference:

Examples:

Calling the deleteResourcePolicy operation

var params = {
  PolicyName: 'STRING_VALUE', /* required */
  PolicyRevisionId: 'STRING_VALUE'
};
xray.deleteResourcePolicy(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • PolicyName — (String)

      The name of the resource policy to delete.

    • PolicyRevisionId — (String)

      Specifies a specific policy revision to delete. Provide a PolicyRevisionId to ensure an atomic delete operation. If the provided revision id does not match the latest policy revision id, an InvalidPolicyRevisionIdException exception is returned.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteSamplingRule(params = {}, callback) ⇒ AWS.Request

Deletes a sampling rule.

Service Reference:

Examples:

Calling the deleteSamplingRule operation

var params = {
  RuleARN: 'STRING_VALUE',
  RuleName: 'STRING_VALUE'
};
xray.deleteSamplingRule(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • 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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SamplingRuleRecord — (map)

        The deleted rule definition and metadata.

        • SamplingRule — (map)

          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.

          • ResourceARNrequired — (String)

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

          • Priorityrequired — (Integer)

            The priority of the sampling rule.

          • FixedRaterequired — (Float)

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

          • ReservoirSizerequired — (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.

          • ServiceNamerequired — (String)

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

          • ServiceTyperequired — (String)

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

          • Hostrequired — (String)

            Matches the hostname from a request URL.

          • HTTPMethodrequired — (String)

            Matches the HTTP method of a request.

          • URLPathrequired — (String)

            Matches the path from a request URL.

          • Versionrequired — (Integer)

            The version of the sampling rule format (1).

          • Attributes — (map<String>)

            Matches attributes derived from the request.

        • CreatedAt — (Date)

          When the rule was created.

        • ModifiedAt — (Date)

          When the rule was last modified.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getEncryptionConfig(params = {}, callback) ⇒ AWS.Request

Retrieves the current encryption configuration for X-Ray data.

Service Reference:

Examples:

Calling the getEncryptionConfig operation

var params = {
};
xray.getEncryptionConfig(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • EncryptionConfig — (map)

        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.

          Possible values include:
          • "UPDATING"
          • "ACTIVE"
        • Type — (String)

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

          Possible values include:
          • "NONE"
          • "KMS"

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getGroup(params = {}, callback) ⇒ AWS.Request

Retrieves group resource details.

Service Reference:

Examples:

Calling the getGroup operation

var params = {
  GroupARN: 'STRING_VALUE',
  GroupName: 'STRING_VALUE'
};
xray.getGroup(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • GroupName — (String)

      The case-sensitive name of the group.

    • GroupARN — (String)

      The ARN of the group that was generated on creation.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Group — (map)

        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 — (map)

          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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getGroups(params = {}, callback) ⇒ AWS.Request

Retrieves all active group details.

Service Reference:

Examples:

Calling the getGroups operation

var params = {
  NextToken: 'STRING_VALUE'
};
xray.getGroups(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      Pagination token.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Groups — (Array<map>)

        The collection of all active groups.

        • 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 — (map)

          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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getInsight(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the getInsight operation

var params = {
  InsightId: 'STRING_VALUE' /* required */
};
xray.getInsight(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InsightId — (String)

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

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Insight — (map)

        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 — (map)

          • Name — (String)

          • Names — (Array<String>)

          • AccountId — (String)

          • Type — (String)

        • Categories — (Array<String>)

          The categories that label and describe the type of insight.

        • State — (String)

          The current state of the insight.

          Possible values include:
          • "ACTIVE"
          • "CLOSED"
        • StartTime — (Date)

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

        • EndTime — (Date)

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

        • Summary — (String)

          A brief description of the insight.

        • ClientRequestImpactStatistics — (map)

          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 — (map)

          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 — (Array<map>)

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

          • ServiceId — (map)

            • Name — (String)

            • Names — (Array<String>)

            • AccountId — (String)

            • Type — (String)

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getInsightEvents(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the getInsightEvents operation

var params = {
  InsightId: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
xray.getInsightEvents(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InsightId — (String)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • InsightEvents — (Array<map>)

        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.

        • Summary — (String)

          A brief description of the event.

        • EventTime — (Date)

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

        • ClientRequestImpactStatistics — (map)

          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 — (map)

          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 — (Array<map>)

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

          • ServiceId — (map)

            • Name — (String)

            • Names — (Array<String>)

            • AccountId — (String)

            • Type — (String)

      • NextToken — (String)

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

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getInsightImpactGraph(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the getInsightImpactGraph operation

var params = {
  EndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  InsightId: 'STRING_VALUE', /* required */
  StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  NextToken: 'STRING_VALUE'
};
xray.getInsightImpactGraph(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • InsightId — (String)

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

    • StartTime — (Date)

      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 — (Date)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • InsightId — (String)

        The insight's unique identifier.

      • StartTime — (Date)

        The provided start time.

      • EndTime — (Date)

        The provided end time.

      • ServiceGraphStartTime — (Date)

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

      • ServiceGraphEndTime — (Date)

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

      • Services — (Array<map>)

        The Amazon Web Services instrumented services related to the insight.

        • 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 — (Array<String>)

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

        • AccountId — (String)

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

        • Edges — (Array<map>)

          Connections to downstream services.

          • ReferenceId — (Integer)

            Identifier of the edge. Unique within a service map.

      • NextToken — (String)

        Pagination token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getInsightSummaries(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the getInsightSummaries operation

var params = {
  EndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  GroupARN: 'STRING_VALUE',
  GroupName: 'STRING_VALUE',
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE',
  States: [
    ACTIVE | CLOSED,
    /* more items */
  ]
};
xray.getInsightSummaries(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • States — (Array<String>)

      The list of insight states.

    • 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 — (Date)

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

    • EndTime — (Date)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • InsightSummaries — (Array<map>)

        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.

        • 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 — (map)

          • Name — (String)

          • Names — (Array<String>)

          • AccountId — (String)

          • Type — (String)

        • Categories — (Array<String>)

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

        • State — (String)

          The current state of the insight.

          Possible values include:
          • "ACTIVE"
          • "CLOSED"
        • StartTime — (Date)

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

        • EndTime — (Date)

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

        • Summary — (String)

          A brief description of the insight.

        • ClientRequestImpactStatistics — (map)

          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 — (map)

          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 — (Array<map>)

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

          • ServiceId — (map)

            • Name — (String)

            • Names — (Array<String>)

            • AccountId — (String)

            • Type — (String)

        • LastUpdateTime — (Date)

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

      • NextToken — (String)

        Pagination token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSamplingRules(params = {}, callback) ⇒ AWS.Request

Retrieves all sampling rules.

Service Reference:

Examples:

Calling the getSamplingRules operation

var params = {
  NextToken: 'STRING_VALUE'
};
xray.getSamplingRules(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      Pagination token.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SamplingRuleRecords — (Array<map>)

        Rule definitions and metadata.

        • SamplingRule — (map)

          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.

          • ResourceARNrequired — (String)

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

          • Priorityrequired — (Integer)

            The priority of the sampling rule.

          • FixedRaterequired — (Float)

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

          • ReservoirSizerequired — (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.

          • ServiceNamerequired — (String)

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

          • ServiceTyperequired — (String)

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

          • Hostrequired — (String)

            Matches the hostname from a request URL.

          • HTTPMethodrequired — (String)

            Matches the HTTP method of a request.

          • URLPathrequired — (String)

            Matches the path from a request URL.

          • Versionrequired — (Integer)

            The version of the sampling rule format (1).

          • Attributes — (map<String>)

            Matches attributes derived from the request.

        • CreatedAt — (Date)

          When the rule was created.

        • ModifiedAt — (Date)

          When the rule was last modified.

      • NextToken — (String)

        Pagination token.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSamplingStatisticSummaries(params = {}, callback) ⇒ AWS.Request

Retrieves information about recent sampling results for all sampling rules.

Service Reference:

Examples:

Calling the getSamplingStatisticSummaries operation

var params = {
  NextToken: 'STRING_VALUE'
};
xray.getSamplingStatisticSummaries(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • NextToken — (String)

      Pagination token.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SamplingStatisticSummaries — (Array<map>)

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

        • RuleName — (String)

          The name of the sampling rule.

        • Timestamp — (Date)

          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.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getSamplingTargets(params = {}, callback) ⇒ AWS.Request

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

Service Reference:

Examples:

Calling the getSamplingTargets operation

var params = {
  SamplingStatisticsDocuments: [ /* required */
    {
      ClientID: 'STRING_VALUE', /* required */
      RequestCount: 'NUMBER_VALUE', /* required */
      RuleName: 'STRING_VALUE', /* required */
      SampledCount: 'NUMBER_VALUE', /* required */
      Timestamp: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
      BorrowCount: 'NUMBER_VALUE'
    },
    /* more items */
  ]
};
xray.getSamplingTargets(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • SamplingStatisticsDocuments — (Array<map>)

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

      • RuleNamerequired — (String)

        The name of the sampling rule.

      • ClientIDrequired — (String)

        A unique identifier for the service in hexadecimal.

      • Timestamprequired — (Date)

        The current time.

      • RequestCountrequired — (Integer)

        The number of requests that matched the rule.

      • SampledCountrequired — (Integer)

        The number of requests recorded.

      • BorrowCount — (Integer)

        The number of requests recorded with borrowed reservoir quota.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • SamplingTargetDocuments — (Array<map>)

        Updated rules that the service should use to sample requests.

        • 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 — (Date)

          When the reservoir quota expires.

        • Interval — (Integer)

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

      • LastRuleModification — (Date)

        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 — (Array<map>)

        Information about SamplingStatisticsDocument that X-Ray could not process.

        • RuleName — (String)

          The name of the sampling rule.

        • ErrorCode — (String)

          The error code.

        • Message — (String)

          The error message.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getServiceGraph(params = {}, callback) ⇒ AWS.Request

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.

Service Reference:

Examples:

Calling the getServiceGraph operation

var params = {
  EndTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  StartTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789, /* required */
  GroupARN: 'STRING_VALUE',
  GroupName: 'STRING_VALUE',
  NextToken: 'STRING_VALUE'
};
xray.getServiceGraph(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • StartTime — (Date)

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

    • EndTime — (Date)

      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.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):