Skip to content

Commit

Permalink
otel-style attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-sentry committed Jan 8, 2025
1 parent bc4ed23 commit 70f7a90
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
14 changes: 12 additions & 2 deletions examples/snuba-ourlogs/1/maximal_log.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,17 @@
"observed_timestamp_nanos": 1715868485371000,
"body": "hello world!",
"attributes": {
"some.user.tag": "hello",
"another.user.tag": 100
"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
}
}
}
21 changes: 19 additions & 2 deletions schemas/snuba-ourlogs.v1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,27 @@
"description": "Numerical value of the severity (1-24 in otel)"
},
"attributes": {
"description": "Manual key/value tag pairs.",
"type": "object",
"description": "key-value tag pairs on this log",
"additionalProperties": {
"type": ["string", "number"]
"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
}
}
},
Expand Down

0 comments on commit 70f7a90

Please sign in to comment.