Skip to content

Commit 234423a

Browse files
authored
feat(spans): Allow either is_remote or is_segment (#451)
1 parent ba5c5f7 commit 234423a

File tree

3 files changed

+123
-3
lines changed

3 files changed

+123
-3
lines changed

examples/ingest-spans/1/basic_span.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"foo": null
7575
},
7676
"end_timestamp": 1759215782.849409,
77-
"is_remote": false,
77+
"is_segment": false,
7878
"links": [
7979
{
8080
"trace_id": "0f62a8b040f340bda5d830223def1d82",
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{
2+
"organization_id": 1,
3+
"project_id": 42,
4+
"key_id": 123,
5+
"event_id": "cbf6960622e14a45abc1f03b2055b186",
6+
"received": 1759215783.850951,
7+
"retention_days": 90,
8+
"downsampled_retention_days": 90,
9+
"attributes": {
10+
"sentry.category": {
11+
"type": "string",
12+
"value": "http"
13+
},
14+
"sentry.description": {
15+
"type": "string",
16+
"value": "GET /api/0/organizations/?member=1"
17+
},
18+
"sentry.group": {
19+
"type": "string",
20+
"value": "37e3d9fab1ae9162"
21+
},
22+
"sentry.is_segment": {
23+
"type": "boolean",
24+
"value": false
25+
},
26+
"sentry.name": {
27+
"type": "string",
28+
"value": "http"
29+
},
30+
"sentry.normalized_description": {
31+
"type": "string",
32+
"value": "GET *"
33+
},
34+
"sentry.op": {
35+
"type": "string",
36+
"value": "http"
37+
},
38+
"sentry.origin": {
39+
"type": "string",
40+
"value": "manual"
41+
},
42+
"sentry.platform": {
43+
"type": "string",
44+
"value": "other"
45+
},
46+
"sentry.sdk.name": {
47+
"type": "string",
48+
"value": "raven-node"
49+
},
50+
"sentry.sdk.version": {
51+
"type": "string",
52+
"value": "2.6.3"
53+
},
54+
"sentry.segment.id": {
55+
"type": "string",
56+
"value": "968cff94913ebb07"
57+
},
58+
"sentry.status": {
59+
"type": "string",
60+
"value": "ok"
61+
},
62+
"sentry.trace.status": {
63+
"type": "string",
64+
"value": "ok"
65+
},
66+
"sentry.transaction": {
67+
"type": "string",
68+
"value": "hi"
69+
},
70+
"sentry.transaction.op": {
71+
"type": "string",
72+
"value": "hi"
73+
},
74+
"foo": null
75+
},
76+
"end_timestamp": 1759215782.849409,
77+
"is_remote": false,
78+
"links": [
79+
{
80+
"trace_id": "0f62a8b040f340bda5d830223def1d82",
81+
"span_id": "cbbbbbbbbbbbbbbc",
82+
"sampled": true,
83+
"attributes": {
84+
"span_key": {
85+
"type": "string",
86+
"value": "span_value"
87+
}
88+
}
89+
},
90+
{
91+
"trace_id": "0f62a8b040f340bda5d830223def1d82",
92+
"span_id": "cbbbbbbbbbbbbbbd",
93+
"sampled": null,
94+
"attributes": {
95+
"span_key": null
96+
}
97+
},
98+
{
99+
"trace_id": "0f62a8b040f340bda5d830223def1d82",
100+
"span_id": "cbbbbbbbbbbbbbbe",
101+
"attributes": null
102+
}
103+
],
104+
"name": "http",
105+
"parent_span_id": "968cff94913ebb07",
106+
"span_id": "bbbbbbbbbbbbbbbb",
107+
"start_timestamp": 1759215782.349409,
108+
"status": "ok",
109+
"trace_id": "ff62a8b040f340bda5d830223def1d81"
110+
}

schemas/ingest-spans.v1.schema.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
"is_remote": {
6060
"type": ["boolean", "null"]
6161
},
62+
"is_segment": {
63+
"type": ["boolean", "null"]
64+
},
6265
"kind": {
6366
"type": ["string", "null"]
6467
},
@@ -92,8 +95,15 @@
9295
"end_timestamp",
9396
"trace_id",
9497
"name",
95-
"status",
96-
"is_remote"
98+
"status"
99+
],
100+
"oneOf": [
101+
{
102+
"required": ["is_remote"]
103+
},
104+
{
105+
"required": ["is_segment"]
106+
}
97107
]
98108
},
99109
"UUID": {

0 commit comments

Comments
 (0)