15
15
class XRayClient extends AbstractApi
16
16
{
17
17
/**
18
- * Uploads segment documents to Amazon Web Services X-Ray. The X-Ray SDK [^1] generates segment documents and sends them
19
- * to the X-Ray daemon, which uploads them in batches. A segment document can be a completed segment, an in-progress
18
+ * Uploads segment documents to Amazon Web Services X-Ray. A segment document can be a completed segment, an in-progress
20
19
* segment, or an array of subsegments.
21
20
*
22
21
* Segments must include the following fields. For the full segment document schema, see Amazon Web Services X-Ray
23
- * Segment Documents [^2 ] in the *Amazon Web Services X-Ray Developer Guide*.
22
+ * Segment Documents [^1 ] in the *Amazon Web Services X-Ray Developer Guide*.
24
23
*
25
24
* **Required segment document fields**
26
25
*
@@ -37,8 +36,8 @@ class XRayClient extends AbstractApi
37
36
* serve, to trace that the request was received. When the response is sent, send the complete segment to overwrite
38
37
* the in-progress segment.
39
38
*
40
- * A `trace_id` consists of three numbers separated by hyphens. For example, 1-58406520-a006649127e371903a2de979. This
41
- * includes:
39
+ * A `trace_id` consists of three numbers separated by hyphens. For example, 1-58406520-a006649127e371903a2de979. For
40
+ * trace IDs created by an X-Ray SDK, or by Amazon Web Services services integrated with X-Ray, a trace ID includes:
42
41
*
43
42
* **Trace ID Format**
44
43
*
@@ -47,8 +46,14 @@ class XRayClient extends AbstractApi
47
46
* 2016 PST in epoch time is `1480615200` seconds, or `58406520` in hexadecimal.
48
47
* - A 96-bit identifier for the trace, globally unique, in 24 hexadecimal digits.
49
48
*
50
- * [^1]: https://docs.aws.amazon.com/xray/index.html
51
- * [^2]: https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html
49
+ * > Trace IDs created via OpenTelemetry have a different format based on the W3C Trace Context specification [^2]. A
50
+ * > W3C trace ID must be formatted in the X-Ray trace ID format when sending to X-Ray. For example, a W3C trace ID
51
+ * > `4efaaf4d1e8720b39541901950019ee5` should be formatted as `1-4efaaf4d-1e8720b39541901950019ee5` when sending to
52
+ * > X-Ray. While X-Ray trace IDs include the original request timestamp in Unix epoch time, this is not required or
53
+ * > validated.
54
+ *
55
+ * [^1]: https://docs.aws.amazon.com/xray/latest/devguide/aws-xray-interface-api.html#xray-api-segmentdocuments.html
56
+ * [^2]: https://www.w3.org/TR/trace-context/
52
57
*
53
58
* @see https://docs.aws.amazon.com/xray/latest/api/API_PutTraceSegments.html
54
59
* @see https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-xray-2016-04-12.html#puttracesegments
0 commit comments