You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ourlogs): Adjust 'log' protocol per sdk feedback (#4592)
### Summary
Now that we've mostly finalized the logs protocol with sdks (see
[develop doc for more
info](getsentry/sentry-docs#12920)), we want to
update Relay to allow the 'log' item type to be sent in this format.
SDK's will likely primarily use the `log` ItemType instead of `otel_log`
since we don't need to change timestamp conventions, can send a
simplified `level` (see `OurLogLevel` added in this PR).
#### Schema changes
We've deprecated some fields in the protocol that only exist for OTEL:
- `severity_number` and `severity_text`, we're coercing these to
`level`, but we're keeping the original severity text and number as
attributes as OTel allows custom severity text.
- `observed_timestamp_nanos` is always set by relay regardless of what
is sent because Relay is the 'collector'. We have to leave this as an
attribute as well since it's being used by the existing consumer for
origin timestamp.
- `timestamp_nanos` becomes `timestamp: Timestamp`
- `trace_flags`, this is unused, and the consumer doesn't even store it
in the table. Will decide what to do with this later.
#### Future work
- The `ourlog_merge_otel` function can be trimmed down since we won't
need to fill in deprecated fields to send the same data to the kafka
consumer.
- We may need to transform the `OurLog` protocol from json received from
sdks to a generic EAP "trace items" kafka message that is essentially a
couple fields (eg. traceid) + a KVMap for `attributes`.
---------
Co-authored-by: Michi Hoffmann <[email protected]>
Co-authored-by: David Herberth <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@
34
34
- Bump the revision of `sysinfo` to the revision at `15b3be3273ba286740122fed7bb7dccd2a79dc8f`. ([#4613](https://github.com/getsentry/relay/pull/4613))
35
35
- Switch the processor and store to `async`. ([#4552](https://github.com/getsentry/relay/pull/4552))
36
36
- Validate the spooling memory configuration on startup. ([#4617](https://github.com/getsentry/relay/pull/4617))
37
+
- Rework currently unused 'log' protocol / envelope item type schema. ([#4592](https://github.com/getsentry/relay/pull/4592))
37
38
- Improve descriptiveness of autoscaling metric name. ([#4629](https://github.com/getsentry/relay/pull/4629))
38
39
- Serialize span's `_meta` information when producing to Kafka. ([#4646](https://github.com/getsentry/relay/pull/4646))
39
40
- Enable connection pooling for asynchronous Redis connections. ([#4622](https://github.com/getsentry/relay/pull/4622))
0 commit comments