-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RUM-1833 feat: Link (emergency) crash Logs to crashed RUM session #1645
RUM-1833 feat: Link (emergency) crash Logs to crashed RUM session #1645
Conversation
.error("Fails to decode crash from RUM", error: error) | ||
.error("Failed to decode crash message in `LogMessageReceiver`", error: error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to differentiate it from other telemetry with the same message.
struct PartialRUMViewEvent: Decodable { | ||
struct Application: Decodable { | ||
let id: String | ||
} | ||
struct Session: Decodable { | ||
let id: String | ||
} | ||
struct View: Decodable { | ||
let id: String | ||
} | ||
|
||
let application: Application | ||
let session: Session | ||
let view: View | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any public/internal doc explaining how this correlation work? In case when there an update needed we can always refer.
Also, we have been doing quite a few changes to make the correlation work and so far they have been very organic. These things impact SDK and we should document them somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair call 👍. I took an extra time to document logs, spans and RUM correlations in this spec (internal).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks, good overall coverage.
A general comment on improving the documentation. Not blocking.
What and why?
📦 This PR adds link to the RUM session for crash reports sent as emergency Log event.
See:
How?
With the "last
RUMViewEvent
" being already encoded inCrashContext.data
, this PR adds extra logic inDatadogLogs
to decode RUM session attributes. Decoding is limited only to these fields that are required so we don't decode the whole event (that wouldn't be even possible asDatadogLogs
has no dependency onDatadogRUM
).Once decoded, these attributes are attached to
LogEvent
following the contract between SDK and Datadog app.Except unit tests covering edge cases (like malformed RUM view information), this PR also adds integration unit tests for "Sending Crash Reports as Logs and RUM".
Last, I took extra time to document logs, spans and RUM correlations in this spec (internal).
Review checklist
Custom CI job configuration (optional)
tools/