feat(ourlogs): Add browser name/version to logs#4757
Conversation
fb0651e to
64dfb13
Compare
64dfb13 to
cf1aece
Compare
Dav1dde
left a comment
There was a problem hiding this comment.
Mostly nits, would be great if you can also modify an existing integration test.
|
Addressed PR review comments, and added a changelog entry.
I pushed up a new integration test in b1aacc3 |
|
CI seems to be failing because of the types - but they should be correct (I can build and test locally). I think this is a stale cache issue. Is there an easy way to blow up the cache and reset this? |
|
@AbhiPrasad it's most likely failing because you test locally with |
|
Good catch @Dav1dde. Would you prefer if I moved the processing logic into it's own folder (I see this pattern with |
|
I think just moving all processing stuff to a new module might be much easier. |
|
I pushed up 19af62a to move all the processing code into it's own file, |
…lts for every platform (#13832) resolves https://linear.app/getsentry/issue/LOGS-28 After testing with some SDKs and getting feedback, we've decided on a list of default attributes the SDKs should try to attach to logs. This includes 1. user attributes from https://develop.sentry.dev/sdk/data-model/event-payloads/user/ 2. browser attributes, parsed from user agents (getsentry/relay#4757) 3. os and device attributes attached to mobile, desktop, and native sdks, based on https://develop.sentry.dev/sdk/data-model/event-payloads/contexts/ I also re-organized this section to make things a bit more clear. --------- Co-authored-by: Philipp Hofmann <philipp.hofmann@sentry.io>
This was messed up when I rebased #4757 #skip-changelog
In #4757 we decided to attach browser name and version to logs. Right now for spans, we prefix browser information with `sentry.X`, see https://github.com/getsentry/sentry/blob/34c738613c9b39e3b0d64336d13b4551a4075c66/src/sentry/search/eap/spans/attributes.py#L334. This is causing inconsistencies between the queries for spans and logs, which is breaking the current queries for the logs view. Considering we are "enhancing" the data via relay, I think it makes sense to also add a `sentry.X` prefix for logs. This PR makes that change. resolves https://linear.app/getsentry/issue/LOGS-152
…lts for every platform (#13832) resolves https://linear.app/getsentry/issue/LOGS-28 After testing with some SDKs and getting feedback, we've decided on a list of default attributes the SDKs should try to attach to logs. This includes 1. user attributes from https://develop.sentry.dev/sdk/data-model/event-payloads/user/ 2. browser attributes, parsed from user agents (getsentry/relay#4757) 3. os and device attributes attached to mobile, desktop, and native sdks, based on https://develop.sentry.dev/sdk/data-model/event-payloads/contexts/ I also re-organized this section to make things a bit more clear. --------- Co-authored-by: Philipp Hofmann <philipp.hofmann@sentry.io>
…lts for every platform (#13832) resolves https://linear.app/getsentry/issue/LOGS-28 After testing with some SDKs and getting feedback, we've decided on a list of default attributes the SDKs should try to attach to logs. This includes 1. user attributes from https://develop.sentry.dev/sdk/data-model/event-payloads/user/ 2. browser attributes, parsed from user agents (getsentry/relay#4757) 3. os and device attributes attached to mobile, desktop, and native sdks, based on https://develop.sentry.dev/sdk/data-model/event-payloads/contexts/ I also re-organized this section to make things a bit more clear. --------- Co-authored-by: Philipp Hofmann <philipp.hofmann@sentry.io>
We've received feedback externally and internally that users want to see browser information attached to their frontend logs. This matches behaviour that already exists in other data types like spans and errors (events) in the product.
To accomplish this, we generate new attributes on the log based on the incoming user agent and client hints. This matches the approach we take with spans and errors.
We set these via two new attributes,
browser.nameandbrowser.version. This is documented in the conventions here:resolves https://linear.app/getsentry/issue/LOGS-133