Skip to content

Commit ff0af33

Browse files
k-fishcleptricDav1dde
authored
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]>
1 parent 69977e1 commit ff0af33

File tree

8 files changed

+1426
-254
lines changed

8 files changed

+1426
-254
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
- Bump the revision of `sysinfo` to the revision at `15b3be3273ba286740122fed7bb7dccd2a79dc8f`. ([#4613](https://github.com/getsentry/relay/pull/4613))
3535
- Switch the processor and store to `async`. ([#4552](https://github.com/getsentry/relay/pull/4552))
3636
- 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))
3738
- Improve descriptiveness of autoscaling metric name. ([#4629](https://github.com/getsentry/relay/pull/4629))
3839
- Serialize span's `_meta` information when producing to Kafka. ([#4646](https://github.com/getsentry/relay/pull/4646))
3940
- Enable connection pooling for asynchronous Redis connections. ([#4622](https://github.com/getsentry/relay/pull/4622))

relay-event-schema/src/processor/traits.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ pub trait Processor: Sized {
113113
process_method!(process_trace_context, crate::protocol::TraceContext);
114114
process_method!(process_native_image_path, crate::protocol::NativeImagePath);
115115
process_method!(process_contexts, crate::protocol::Contexts);
116-
process_method!(process_attribute_value, crate::protocol::AttributeValue);
117116

118117
fn process_other(
119118
&mut self,

0 commit comments

Comments
 (0)