Skip to content

Commit 39dedba

Browse files
authored
fix: Add missing fields to buffered-segments and ingest-spans (#411)
Adds fields that are present and required on `buffered-segments`, but have not been included in its schema. The preceding `ingest-spans` topic already had these fields included. Also exposes `MeasurementValue` as a named type so we can import it in Sentry.
1 parent cb4268d commit 39dedba

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

examples/buffered-segments/1/basic_buffered_segment.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
"user": "ip:127.0.0.1"
2222
},
2323
"span_id": "95acbe6d30a66717",
24-
"start_timestamp_ms": 1706734066840,
24+
"start_timestamp_ms": 1715868485371,
25+
"start_timestamp_precise": 1715868485.370551,
26+
"end_timestamp_precise": 1715868486.370551,
2527
"trace_id": "8e6f22e6169545cc963255d0f29cb76b"
2628
},
2729
{
@@ -45,7 +47,9 @@
4547
"user": "ip:127.0.0.1"
4648
},
4749
"span_id": "95acbe6d30a66717",
48-
"start_timestamp_ms": 1706734066840,
50+
"start_timestamp_ms": 1715868485371,
51+
"start_timestamp_precise": 1715868485.370551,
52+
"end_timestamp_precise": 1715868486.370551,
4953
"trace_id": "8e6f22e6169545cc963255d0f29cb76b"
5054
}
5155
]

schemas/buffered-segments.v1.schema.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@
5959
"$ref": "#/definitions/UInt",
6060
"description": "The start timestamp of the span in milliseconds since epoch."
6161
},
62+
"start_timestamp_precise": {
63+
"$ref": "#/definitions/PositiveFloat",
64+
"description": "UNIX timestamp in seconds with fractional part up to microsecond precision."
65+
},
66+
"end_timestamp_precise": {
67+
"$ref": "#/definitions/PositiveFloat",
68+
"description": "UNIX timestamp in seconds with fractional part up to microsecond precision."
69+
},
6270
"duration_ms": {
6371
"$ref": "#/definitions/UInt32",
6472
"description": "The duration of the span in milliseconds."
@@ -92,6 +100,9 @@
92100
},
93101
"measurements": {
94102
"$ref": "#/definitions/Measurements"
103+
},
104+
"data": {
105+
"$ref": "#/definitions/Data"
95106
}
96107
},
97108
"required": [
@@ -102,6 +113,8 @@
102113
"retention_days",
103114
"span_id",
104115
"start_timestamp_ms",
116+
"start_timestamp_precise",
117+
"end_timestamp_precise",
105118
"trace_id"
106119
]
107120
},
@@ -184,8 +197,12 @@
184197
"$ref": "#/definitions/MeasurementValue"
185198
}
186199
},
200+
"Data": {
201+
"type": "object"
202+
},
187203
"MeasurementValue": {
188204
"type": "object",
205+
"title": "measurement_value",
189206
"properties": {
190207
"value": {
191208
"type": "number"

0 commit comments

Comments
 (0)