Skip to content

Commit 6b97499

Browse files
committed
docs(sdks): New Span Protocol
1 parent 28ad795 commit 6b97499

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
title: Span Protocol
3+
---
4+
5+
<Alert level="info">
6+
This document uses key words such as "MUST", "SHOULD", and "MAY" as defined in [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt) to indicate requirement levels.
7+
8+
Furthermore, this is work in progress and does not represent the final state.
9+
</Alert>
10+
11+
The SDK must implement a new "span" envelope item, which is used to emit an entire span tree (one root span and its children).
12+
The payload of each envelope item follows the [OpenTelemetry Protocol](https://opentelemetry.io/docs/specs/otel/protocol/).
13+
14+
```
15+
{
16+
"event_id":"9ec79c33ec9942ab8353589fcb2e04dc"
17+
}
18+
{
19+
"type": "span"
20+
}
21+
{
22+
"traceId": "32d3c7cb501fbddbe3ce1016a72d50b5",
23+
"spanId": "e91d37480970523b",
24+
"name": "GET /",
25+
"startTime": "1544712660",
26+
"endTime": "1544712680",
27+
"attributes": [
28+
{
29+
"key": "sentry.op",
30+
"value": {
31+
"stringValue": "http.sever",
32+
}
33+
},
34+
{
35+
"key": "http.response.status_code",
36+
"value": {
37+
"intValue": "200",
38+
}
39+
}
40+
]
41+
}
42+
{
43+
"type": "span"
44+
}
45+
{
46+
"traceId": "32d3c7cb501fbddbe3ce1016a72d50b5",
47+
"spanId": "6b22b3af586e777a",
48+
"parentSpanId": "e91d37480970523b",
49+
"name": "UserMiddleware",
50+
"startTimeUnix": "1544712665",
51+
"endTimeUnix": "1544712675",
52+
"attributes": [
53+
{
54+
"key": "sentry.op",
55+
"value": {
56+
"stringValue": "middleware.handle",
57+
}
58+
},
59+
{
60+
"key": "user.email",
61+
"value": {
62+
"stringValue": "[email protected]",
63+
}
64+
}
65+
]
66+
}
67+
```

0 commit comments

Comments
 (0)