Status | |
---|---|
Stability | beta |
Supported pipeline types | traces |
Distributions | contrib, AWS |
This exporter converts OpenTelemetry spans to AWS X-Ray Segment Documents and then sends them directly to X-Ray using the PutTraceSegments API.
Trace IDs and Span IDs are expected to be originally generated by either AWS API Gateway or AWS ALB and
propagated by them using the X-Amzn-Trace-Id
HTTP header. However, other generation sources are
supported by replacing fully-random Trace IDs with X-Ray formatted Trace IDs where necessary:
AWS X-Ray IDs are the same size as W3C Trace Context IDs but differ in that the first 32 bits of a Trace ID is the Unix epoch time when the trace was started. Since X-Ray only allows submission of Trace IDs from the past 30 days, received Trace IDs are checked and spans without a valid timestamp are dropped.
This means in order for spans to appear in X-Ray, the client SDK MUST use an X-Ray ID generator. For more information, see configuring the X-Ray exporter.
The http
object is populated when the component
attribute value is grpc
as well as http
. Other
synchronous call types should also result in the http
object being populated.
The following AWS-specific Span attributes are supported in addition to the standard names and values defined in the OpenTelemetry Semantic Conventions.
Attribute name | Notes and examples | Required? |
---|---|---|
aws.operation |
The name of the API action invoked against an AWS service or resource. | No |
aws.account_id |
The AWS account number if accessing resource in different account. | No |
aws.region |
The AWS region if accessing resource in different region from app. | No |
aws.request_id |
AWS-generated unique identifier for the request. | No |
aws.queue_url |
For operations on an Amazon SQS queue, the queue's URL. | No |
aws.table_name |
For operations on a DynamoDB table, the name of the table. | No |
Any of these values supplied are used to populate the aws
object in addition to any relevant data supplied
by the Span Resource object. X-Ray uses this data to generate inferred segments for the remote APIs.
The following exporter configuration parameters are supported. They mirror and have the same affect as the comparable AWS X-Ray Daemon configuration values.
Name | Description | Default |
---|---|---|
num_workers |
Maximum number of concurrent calls to AWS X-Ray to upload documents. | 8 |
endpoint |
Optionally override the default X-Ray service endpoint. | |
request_timeout |
Number of seconds before timing out a request. | 30 |
max_retries |
Maximun number of attempts to post a batch before failing. | 2 |
no_verify_ssl |
Enable or disable TLS certificate verification. | false |
proxy_address |
Upload segments to AWS X-Ray through a proxy. | |
region |
Send segments to AWS X-Ray service in a specific region. | |
local_mode |
Local mode to skip EC2 instance metadata check. | false |
resource_arn |
Amazon Resource Name (ARN) of the AWS resource running the collector. | |
role_arn |
IAM role to upload segments to a different account. | |
indexed_attributes |
List of attribute names to be converted to X-Ray annotations. | |
index_all_attributes |
Enable or disable conversion of all OpenTelemetry attributes to X-Ray annotations. | false |
This exporter follows default credential resolution for the aws-sdk-go.
Follow the guidelines for the credential configuration.