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
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
/topics/outcomes-billing.yaml @getsentry/owners-snuba @getsentry/revenue
/topics/outcomes-billing-dlq.yaml @getsentry/owners-snuba @getsentry/revenue
/topics/snuba-metrics.yaml @getsentry/owners-snuba
/topics/snuba-ourlogs.yaml @getsentry/owners-snuba
/topics/snuba-generic-metrics.yaml @getsentry/owners-snuba
/topics/generic-events.yaml @getsentry/owners-snuba @getsentry/issues
/topics/group-attributes.yaml @getsentry/owners-snuba @getsentry/issues
Expand Down
27 changes: 27 additions & 0 deletions examples/snuba-ourlogs/1/maximal_log.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"organization_id": 69,
"project_id": 1,
"trace_id": "3c8c20d5-0a54-4a1c-ba10-f76f574d856f",
"trace_flags": 255,
"span_id": "11002233AABBCCDD",
"severity_text": "WARNING",
"severity_number": 1,
"retention_days": 90,
"timestamp_nanos": 1715868485371000,
"observed_timestamp_nanos": 1715868485371000,
"body": "hello world!",
"attributes": {
"some.user.tag": {
"string_value": "hello"
},
"another.user.tag": {
"int_value": 10
},
"double.user.tag": {
"double_value": -10.59
},
"bool.user.tag": {
"bool_value": true
}
}
}
9 changes: 9 additions & 0 deletions examples/snuba-ourlogs/1/minimal_log.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"organization_id": 69,
"project_id": 1,
"received": 1715868485.381,
"retention_days": 90,
"timestamp_nanos": 1715868485371000,
"observed_timestamp_nanos": 1715868485371000,
"body": "hello world!"
}
108 changes: 108 additions & 0 deletions schemas/snuba-ourlogs.v1.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ourlogs_stream_message",
"$ref": "#/definitions/OurlogEvent",
"definitions": {
"OurlogEvent": {
"type": "object",
"title": "ourlog_event",
"additionalProperties": true,
"properties": {
"organization_id": {
"$ref": "#/definitions/UInt"
},
"project_id": {
"$ref": "#/definitions/UInt"
},
"trace_id": {
"$ref": "#/definitions/UUID",
"description": "The trace ID is a unique identifier for a trace."
},
"trace_flags": {
"$ref": "#/definitions/UInt8",
"description": "Flags are sent by OTEL clients, bitmask (e.g., SAMPLED)"
},
"timestamp_nanos": {
"$ref": "#/definitions/UInt",
"description": "The timestamp of the log in nanoseconds since epoch."
},
"retention_days": {
"$ref": "#/definitions/UInt16",
"description": "The minimum time we should store this log until it's deleted"
},
"observed_timestamp_nanos": {
"$ref": "#/definitions/UInt",
"description": "Unix timestamp (in nanoseconds) when the log was received by Sentry."
},
"body": {
"type": "string",
"description": "The body of the log."
},
"severity_text": {
"type": "string",
"description": "The name of the severity level (e.g., WARNING)"
},
"severity_number": {
"$ref": "#/definitions/UInt8",
"description": "Numerical value of the severity (1-24 in otel)"
},
"attributes": {
"type": "object",
"description": "key-value tag pairs on this log",
"additionalProperties": {
"type": "object",
"properties": {
"string_value": {
"type": "string"
},
"int_value": {
"type": "integer"
},
"double_value": {
"type": "number"
},
"bool_value": {
"type": "boolean"
}
},
"additionalProperties": false,
"minProperties": 1,
"maxProperties": 1
}
}
},
"required": [
"project_id",
"organization_id",
"observed_timestamp_nanos",
"retention_days",
"timestamp_nanos",
"body"
]
},
"UUID": {
"type": "string",
"minLength": 32,
"maxLength": 36
},
"SpanID": {
"type": "string",
"minLength": 16,
"maxLength": 16
},
"UInt": {
"type": "integer",
"minimum": 0
},
"UInt8": {
"type": "integer",
"minimum": 0,
"maximum": 255
},
"UInt16": {
"type": "integer",
"minimum": 0,
"maximum": 65535
}
}
}
18 changes: 18 additions & 0 deletions topics/snuba-ourlogs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
description: User-sent logs to us for our logging product, 'ourlogs'
services:
producers:
- getsentry/relay
consumers:
- getsentry/snuba
schemas:
- version: 1
compatibility_mode: none
type: json
resource: snuba-ourlogs.v1.schema.json
examples:
- snuba-ourlogs/1/
topic_creation_config:
compression.type: lz4
retention.ms: "86400000"
max.message.bytes: "10000000"
message.timestamp.type: LogAppendTime
Loading