@ThreadSafe @Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AWSXRayClient extends AmazonWebServiceClient implements AWSXRay
Amazon Web Services X-Ray provides APIs for managing debug traces and retrieving service maps and other data created by processing those traces.
Modifier and Type | Field and Description |
---|---|
protected static ClientConfigurationFactory |
configFactory
Client configuration factory providing ClientConfigurations tailored to this client
|
client, clientConfiguration, endpoint, isEndpointOverridden, LOGGING_AWS_REQUEST_METRIC, requestHandler2s, timeOffset
ENDPOINT_PREFIX
Constructor and Description |
---|
AWSXRayClient()
Deprecated.
|
AWSXRayClient(AWSCredentials awsCredentials)
Deprecated.
use
AwsClientBuilder.withCredentials(AWSCredentialsProvider) for example:
AWSXRayClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build(); |
AWSXRayClient(AWSCredentials awsCredentials,
ClientConfiguration clientConfiguration)
|
AWSXRayClient(AWSCredentialsProvider awsCredentialsProvider)
Deprecated.
|
AWSXRayClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration)
|
AWSXRayClient(AWSCredentialsProvider awsCredentialsProvider,
ClientConfiguration clientConfiguration,
RequestMetricCollector requestMetricCollector)
|
AWSXRayClient(ClientConfiguration clientConfiguration)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
BatchGetTracesResult |
batchGetTraces(BatchGetTracesRequest request)
Retrieves a list of traces specified by ID.
|
static AWSXRayClientBuilder |
builder() |
CreateGroupResult |
createGroup(CreateGroupRequest request)
Creates a group resource with a name and a filter expression.
|
CreateSamplingRuleResult |
createSamplingRule(CreateSamplingRuleRequest request)
Creates a rule to control sampling behavior for instrumented applications.
|
DeleteGroupResult |
deleteGroup(DeleteGroupRequest request)
Deletes a group resource.
|
DeleteSamplingRuleResult |
deleteSamplingRule(DeleteSamplingRuleRequest request)
Deletes a sampling rule.
|
ResponseMetadata |
getCachedResponseMetadata(AmazonWebServiceRequest request)
Returns additional metadata for a previously executed successful, request, typically used for debugging issues
where a service isn't acting as expected.
|
GetEncryptionConfigResult |
getEncryptionConfig(GetEncryptionConfigRequest request)
Retrieves the current encryption configuration for X-Ray data.
|
GetGroupResult |
getGroup(GetGroupRequest request)
Retrieves group resource details.
|
GetGroupsResult |
getGroups(GetGroupsRequest request)
Retrieves all active group details.
|
GetInsightResult |
getInsight(GetInsightRequest request)
Retrieves the summary information of an insight.
|
GetInsightEventsResult |
getInsightEvents(GetInsightEventsRequest request)
X-Ray reevaluates insights periodically until they're resolved, and records each intermediate state as an event.
|
GetInsightImpactGraphResult |
getInsightImpactGraph(GetInsightImpactGraphRequest request)
Retrieves a service graph structure filtered by the specified insight.
|
GetInsightSummariesResult |
getInsightSummaries(GetInsightSummariesRequest request)
Retrieves the summaries of all insights in the specified group matching the provided filter values.
|
GetSamplingRulesResult |
getSamplingRules(GetSamplingRulesRequest request)
Retrieves all sampling rules.
|
GetSamplingStatisticSummariesResult |
getSamplingStatisticSummaries(GetSamplingStatisticSummariesRequest request)
Retrieves information about recent sampling results for all sampling rules.
|
GetSamplingTargetsResult |
getSamplingTargets(GetSamplingTargetsRequest request)
Requests a sampling quota for rules that the service is using to sample requests.
|
GetServiceGraphResult |
getServiceGraph(GetServiceGraphRequest request)
Retrieves a document that describes services that process incoming requests, and downstream services that they
call as a result.
|
GetTimeSeriesServiceStatisticsResult |
getTimeSeriesServiceStatistics(GetTimeSeriesServiceStatisticsRequest request)
Get an aggregation of service statistics defined by a specific time range.
|
GetTraceGraphResult |
getTraceGraph(GetTraceGraphRequest request)
Retrieves a service graph for one or more specific trace IDs.
|
GetTraceSummariesResult |
getTraceSummaries(GetTraceSummariesRequest request)
Retrieves IDs and annotations for traces available for a specified time frame using an optional filter.
|
ListTagsForResourceResult |
listTagsForResource(ListTagsForResourceRequest request)
Returns a list of tags that are applied to the specified Amazon Web Services X-Ray group or sampling rule.
|
PutEncryptionConfigResult |
putEncryptionConfig(PutEncryptionConfigRequest request)
Updates the encryption configuration for X-Ray data.
|
PutTelemetryRecordsResult |
putTelemetryRecords(PutTelemetryRecordsRequest request)
Used by the Amazon Web Services X-Ray daemon to upload telemetry.
|
PutTraceSegmentsResult |
putTraceSegments(PutTraceSegmentsRequest request)
Uploads segment documents to Amazon Web Services X-Ray.
|
void |
shutdown()
Shuts down this client object, releasing any resources that might be held open.
|
TagResourceResult |
tagResource(TagResourceRequest request)
Applies tags to an existing Amazon Web Services X-Ray group or sampling rule.
|
UntagResourceResult |
untagResource(UntagResourceRequest request)
Removes tags from an Amazon Web Services X-Ray group or sampling rule.
|
UpdateGroupResult |
updateGroup(UpdateGroupRequest request)
Updates a group resource.
|
UpdateSamplingRuleResult |
updateSamplingRule(UpdateSamplingRuleRequest request)
Modifies a sampling rule's configuration.
|
addRequestHandler, addRequestHandler, beforeClientExecution, beforeMarshalling, calculateCRC32FromCompressedData, checkMutability, configureRegion, createExecutionContext, createExecutionContext, createExecutionContext, createSignerProvider, endClientExecution, endClientExecution, getClientConfiguration, getClientId, getEndpointPrefix, getMonitoringListeners, getRequestMetricsCollector, getServiceAbbreviation, getServiceName, getServiceNameIntern, getSigner, getSignerByURI, getSignerOverride, getSignerProvider, getSignerRegionOverride, getSigningRegion, getTimeOffset, isCsmEnabled, isEndpointOverridden, isProfilingEnabled, isRequestMetricsEnabled, makeImmutable, removeRequestHandler, removeRequestHandler, requestMetricCollector, setEndpoint, setEndpoint, setEndpointPrefix, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shouldGenerateClientSideMonitoringEvents, useStrictHostNameVerification, withEndpoint, withRegion, withRegion, withTimeOffset
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setEndpoint, setRegion
protected static final ClientConfigurationFactory configFactory
@Deprecated public AWSXRayClient()
AWSXRayClientBuilder.defaultClient()
All service calls made using this new client object are blocking, and will not return until the service call completes.
DefaultAWSCredentialsProviderChain
@Deprecated public AWSXRayClient(ClientConfiguration clientConfiguration)
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
clientConfiguration
- The client configuration options controlling how this client connects to AWS X-Ray (ex: proxy settings,
retry counts, etc.).DefaultAWSCredentialsProviderChain
@Deprecated public AWSXRayClient(AWSCredentials awsCredentials)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
for example:
AWSXRayClientBuilder.standard().withCredentials(new AWSStaticCredentialsProvider(awsCredentials)).build();
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.@Deprecated public AWSXRayClient(AWSCredentials awsCredentials, ClientConfiguration clientConfiguration)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentials
- The AWS credentials (access key ID and secret key) to use when authenticating with AWS services.clientConfiguration
- The client configuration options controlling how this client connects to AWS X-Ray (ex: proxy settings,
retry counts, etc.).@Deprecated public AWSXRayClient(AWSCredentialsProvider awsCredentialsProvider)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.@Deprecated public AWSXRayClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.clientConfiguration
- The client configuration options controlling how this client connects to AWS X-Ray (ex: proxy settings,
retry counts, etc.).@Deprecated public AWSXRayClient(AWSCredentialsProvider awsCredentialsProvider, ClientConfiguration clientConfiguration, RequestMetricCollector requestMetricCollector)
AwsClientBuilder.withCredentials(AWSCredentialsProvider)
and
AwsClientBuilder.withClientConfiguration(ClientConfiguration)
and
AwsClientBuilder.withMetricsCollector(RequestMetricCollector)
All service calls made using this new client object are blocking, and will not return until the service call completes.
awsCredentialsProvider
- The AWS credentials provider which will provide credentials to authenticate requests with AWS services.clientConfiguration
- The client configuration options controlling how this client connects to AWS X-Ray (ex: proxy settings,
retry counts, etc.).requestMetricCollector
- optional request metric collectorpublic static AWSXRayClientBuilder builder()
public BatchGetTracesResult batchGetTraces(BatchGetTracesRequest 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.
batchGetTraces
in interface AWSXRay
batchGetTracesRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public CreateGroupResult createGroup(CreateGroupRequest request)
Creates a group resource with a name and a filter expression.
createGroup
in interface AWSXRay
createGroupRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public CreateSamplingRuleResult createSamplingRule(CreateSamplingRuleRequest 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.
createSamplingRule
in interface AWSXRay
createSamplingRuleRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.RuleLimitExceededException
- You have reached the maximum number of sampling rules.public DeleteGroupResult deleteGroup(DeleteGroupRequest request)
Deletes a group resource.
deleteGroup
in interface AWSXRay
deleteGroupRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public DeleteSamplingRuleResult deleteSamplingRule(DeleteSamplingRuleRequest request)
Deletes a sampling rule.
deleteSamplingRule
in interface AWSXRay
deleteSamplingRuleRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public GetEncryptionConfigResult getEncryptionConfig(GetEncryptionConfigRequest request)
Retrieves the current encryption configuration for X-Ray data.
getEncryptionConfig
in interface AWSXRay
getEncryptionConfigRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public GetGroupResult getGroup(GetGroupRequest request)
Retrieves group resource details.
getGroup
in interface AWSXRay
getGroupRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public GetGroupsResult getGroups(GetGroupsRequest request)
Retrieves all active group details.
getGroups
in interface AWSXRay
getGroupsRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public GetInsightResult getInsight(GetInsightRequest 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.
getInsight
in interface AWSXRay
getInsightRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public GetInsightEventsResult getInsightEvents(GetInsightEventsRequest 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.
getInsightEvents
in interface AWSXRay
getInsightEventsRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public GetInsightImpactGraphResult getInsightImpactGraph(GetInsightImpactGraphRequest 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.
getInsightImpactGraph
in interface AWSXRay
getInsightImpactGraphRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public GetInsightSummariesResult getInsightSummaries(GetInsightSummariesRequest request)
Retrieves the summaries of all insights in the specified group matching the provided filter values.
getInsightSummaries
in interface AWSXRay
getInsightSummariesRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public GetSamplingRulesResult getSamplingRules(GetSamplingRulesRequest request)
Retrieves all sampling rules.
getSamplingRules
in interface AWSXRay
getSamplingRulesRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public GetSamplingStatisticSummariesResult getSamplingStatisticSummaries(GetSamplingStatisticSummariesRequest request)
Retrieves information about recent sampling results for all sampling rules.
getSamplingStatisticSummaries
in interface AWSXRay
getSamplingStatisticSummariesRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public GetSamplingTargetsResult getSamplingTargets(GetSamplingTargetsRequest request)
Requests a sampling quota for rules that the service is using to sample requests.
getSamplingTargets
in interface AWSXRay
getSamplingTargetsRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public GetServiceGraphResult getServiceGraph(GetServiceGraphRequest 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.
getServiceGraph
in interface AWSXRay
getServiceGraphRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public GetTimeSeriesServiceStatisticsResult getTimeSeriesServiceStatistics(GetTimeSeriesServiceStatisticsRequest request)
Get an aggregation of service statistics defined by a specific time range.
getTimeSeriesServiceStatistics
in interface AWSXRay
getTimeSeriesServiceStatisticsRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public GetTraceGraphResult getTraceGraph(GetTraceGraphRequest request)
Retrieves a service graph for one or more specific trace IDs.
getTraceGraph
in interface AWSXRay
getTraceGraphRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public GetTraceSummariesResult getTraceSummaries(GetTraceSummariesRequest request)
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.
getTraceSummaries
in interface AWSXRay
getTraceSummariesRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public ListTagsForResourceResult listTagsForResource(ListTagsForResourceRequest request)
Returns a list of tags that are applied to the specified Amazon Web Services X-Ray group or sampling rule.
listTagsForResource
in interface AWSXRay
listTagsForResourceRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.ResourceNotFoundException
- The resource was not found. Verify that the name or Amazon Resource Name (ARN) of the resource is
correct.public PutEncryptionConfigResult putEncryptionConfig(PutEncryptionConfigRequest request)
Updates the encryption configuration for X-Ray data.
putEncryptionConfig
in interface AWSXRay
putEncryptionConfigRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public PutTelemetryRecordsResult putTelemetryRecords(PutTelemetryRecordsRequest request)
Used by the Amazon Web Services X-Ray daemon to upload telemetry.
putTelemetryRecords
in interface AWSXRay
putTelemetryRecordsRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public PutTraceSegmentsResult putTraceSegments(PutTraceSegmentsRequest request)
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.
putTraceSegments
in interface AWSXRay
putTraceSegmentsRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public TagResourceResult tagResource(TagResourceRequest request)
Applies tags to an existing Amazon Web Services X-Ray group or sampling rule.
tagResource
in interface AWSXRay
tagResourceRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.ResourceNotFoundException
- The resource was not found. Verify that the name or Amazon Resource Name (ARN) of the resource is
correct.TooManyTagsException
- You have exceeded the maximum number of tags you can apply to this resource.public UntagResourceResult untagResource(UntagResourceRequest request)
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).
untagResource
in interface AWSXRay
untagResourceRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.ResourceNotFoundException
- The resource was not found. Verify that the name or Amazon Resource Name (ARN) of the resource is
correct.public UpdateGroupResult updateGroup(UpdateGroupRequest request)
Updates a group resource.
updateGroup
in interface AWSXRay
updateGroupRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public UpdateSamplingRuleResult updateSamplingRule(UpdateSamplingRuleRequest request)
Modifies a sampling rule's configuration.
updateSamplingRule
in interface AWSXRay
updateSamplingRuleRequest
- InvalidRequestException
- The request is missing required parameters or has invalid parameters.ThrottledException
- The request exceeds the maximum number of requests per second.public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing the request.
getCachedResponseMetadata
in interface AWSXRay
request
- The originally executed requestpublic void shutdown()
AWSXRay
shutdown
in interface AWSXRay
shutdown
in class AmazonWebServiceClient
Copyright © 2021. All rights reserved.