Skip to content

X-Ray APIsΒΆ

X-Ray Write APIs (used by the X-Ray daemon)

  • PutTraceSegments: Uploads segment documents to AWS X-Ray
  • PutTelemetryRecords: Used by the AWS X-Ray daemon to upload telemetry.
    • SegmentsReceivedCount
    • SegmentsRejectedCount
    • BackendConnectionErrors
    • ...
  • GetSamplingRules: Retrieve all sampling rules (to know what/when to send)
  • GetSamplingTargets & GetSamplingStatisticSummaries: advanced
  • The X-Ray deaemon needs to have an IAM policy authorizing the correct API calls to function correctly.
"Effect": "Allow",
"Action": [
    "xray:PutTraceSegments",
    "xray:PutTelemetryRecords",
    "xray:GetSamplingRules",
    "xray:GetSamplingTargets",
    "xray:GetSamplingStatisticSummaries"
],
"Resource": [
    "*"
]

arn::aws::iam::aws::policy/AWSXrayWriteOnlyAccess


Read APIs

  • GetServiceGraph: main graph
  • BetchGetTraces: Retrieves a list of traces specified by ID. Each trace is a collection of segment documents that originates from a single request.
  • GetTraceSummaries: 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.
  • GetTraceGraph: Retrieves a service graph for one or more specific trace IDs.
"Effect": "Allow",
"Action": [
    "xray:GetSamplingRules",
    "xray:GetSamplingTargets",
    "xray:GetSamplingStatisticSummaries",
    "xray:BatchGetTraces",
    "xray:GetServiceGraph",
    "xray:GetTraceGraph",
    "xray:GetTraceSummaries",
    "xray:GetGroups",
    "xray:GetGroup",
    "xray:GetTimeSeriesServiceStatistics"
],
"Resource": [
    "*"
]