Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions examples/ingest-spans/1/null_fields.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"organization_id": 1,
"project_id": 42,
"key_id": 123,
"event_id": "cbf6960622e14a45abc1f03b2055b186",
"received": 1759215783.850951,
"retention_days": 90,
"downsampled_retention_days": 90,
"attributes": null,
"end_timestamp": null,
"is_remote": null,
"links": null,
"name": null,
"parent_span_id": null,
"span_id": null,
"start_timestamp": null,
"status": null,
"trace_id": null,
"kind": null
}
31 changes: 31 additions & 0 deletions examples/ingest-spans/1/null_in_links.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"organization_id": 1,
"project_id": 42,
"key_id": 123,
"event_id": "cbf6960622e14a45abc1f03b2055b186",
"received": 1759215783.850951,
"retention_days": 90,
"downsampled_retention_days": 90,
"attributes": null,
"end_timestamp": null,
"is_remote": null,
"links": [
{
"trace_id": null,
"span_id": null,
"sampled": null,
"attributes": {
"span_key": {
"type": null,
"value": null
}
}
}
],
"name": null,
"parent_span_id": null,
"span_id": null,
"start_timestamp": null,
"status": null,
"trace_id": null
}
5 changes: 1 addition & 4 deletions rust/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,6 @@ mod tests {
else {
panic!();
};
assert_eq!(
&message,
r#"/is_remote: null is not of type "boolean". : "organization_id" is a required property. : "project_id" is a required property. : "received" is a required property. : "retention_days" is a required property. : "span_id" is a required property. : "start_timestamp" is a required property. : "end_timestamp" is a required property. : "trace_id" is a required property. : "name" is a required property. : "status" is a required property"#
);
assert_eq!(&message, ": \"organization_id\" is a required property. : \"project_id\" is a required property. : \"received\" is a required property. : \"retention_days\" is a required property. : \"span_id\" is a required property. : \"start_timestamp\" is a required property. : \"end_timestamp\" is a required property. : \"trace_id\" is a required property. : \"name\" is a required property. : \"status\" is a required property");
}
}
69 changes: 52 additions & 17 deletions schemas/ingest-spans.v1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,29 @@
"description": "The trace ID is a unique identifier for a trace. It is a 16 byte hexadecimal string."
},
"span_id": {
"type": "string",
"type": ["string", "null"],
"description": "The span ID is a unique identifier for a span within a trace. It is an 8 byte hexadecimal string."
},
"parent_span_id": {
"type": ["string", "null"],
"description": "The parent span ID is the ID of the span that caused this span. It is an 8 byte hexadecimal string."
},
"start_timestamp": {
"$ref": "file://ingest-spans.v1.schema.json#/definitions/PositiveFloat",
"$anyOf": [
{
"$ref": "file://ingest-spans.v1.schema.json#/definitions/PositiveFloat"
},
null
],
"description": "UNIX timestamp in seconds with fractional part up to microsecond precision."
},
"end_timestamp": {
"$ref": "file://ingest-spans.v1.schema.json#/definitions/PositiveFloat",
"$anyOf": [
{
"$ref": "file://ingest-spans.v1.schema.json#/definitions/PositiveFloat"
},
null
],
"description": "UNIX timestamp in seconds with fractional part up to microsecond precision."
},
"retention_days": {
Expand All @@ -51,19 +61,19 @@
"description": "Unix timestamp when the span was received by Sentry."
},
"name": {
"type": "string"
"type": ["string", "null"]
},
"status": {
"$ref": "file://ingest-spans.v1.schema.json#/definitions/SpanStatus"
},
"is_remote": {
"type": "boolean"
"type": ["boolean", "null"]
},
"kind": {
"$ref": "file://ingest-spans.v1.schema.json#/definitions/SpanKind"
},
"links": {
"type": "array",
"type": ["array", "null"],
"items": {
"$ref": "file://ingest-spans.v1.schema.json#/definitions/SpanLink"
}
Expand All @@ -90,7 +100,7 @@
]
},
"UUID": {
"type": "string",
"type": ["string", "null"],
"minLength": 32,
"maxLength": 36
},
Expand All @@ -113,35 +123,47 @@
"minimum": 0
},
"SpanStatus": {
"type": "string",
"enum": ["ok", "error"]
"anyOf": [
{
"enum": ["ok", "error"]
},
{
"type": "null"
}
]
},
"SpanKind": {
"type": "string",
"enum": ["internal", "server", "client", "producer", "consumer"]
"anyOf": [
{
"type": "null"
},
{
"enum": ["internal", "server", "client", "producer", "consumer"]
}
]
},
"SpanLink": {
"type": "object",
"type": ["object", "null"],
"title": "span_link",
"additionalProperties": true,
"properties": {
"trace_id": {
"$ref": "file://ingest-spans.v1.schema.json#/definitions/UUID"
},
"span_id": {
"type": "string"
"type": ["string", "null"]
},
"attributes": {
"$ref": "file://ingest-spans.v1.schema.json#/definitions/Attributes"
},
"sampled": {
"type": "boolean"
"type": ["boolean", "null"]
}
},
"required": ["trace_id", "span_id"]
},
"Attributes": {
"type": "object",
"type": ["object", "null"],
"additionalProperties": {
"$ref": "file://ingest-spans.v1.schema.json#/definitions/AttributeValue"
}
Expand All @@ -150,8 +172,21 @@
"type": ["null", "object"],
"properties": {
"type": {
"type": "string",
"enum": ["boolean", "integer", "double", "string", "array", "object"]
"anyOf": [
{
"type": "null"
},
{
"enum": [
"boolean",
"integer",
"double",
"string",
"array",
"object"
]
}
]
},
"value": {
"type": ["number", "null", "string", "boolean", "array", "object"]
Expand Down