-
Notifications
You must be signed in to change notification settings - Fork 16
feature: NR-455916 errored session sample #562
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
base: develop
Are you sure you want to change the base?
feature: NR-455916 errored session sample #562
Conversation
… sessions sampling is added
…to feature/NR-455916-error-session-sample
… feature/NR-455916-error-session-sample # Conflicts: # Agent/General/NewRelicAgentInternal.h # Agent/General/NewRelicAgentInternal.m # Agent/SessionReplay/SessionReplayManager.swift
… feature/NR-455916-error-session-sample
… feature/NR-455916-error-session-sample # Conflicts: # Agent/SessionReplay/ViewCaptors/UIImageViewThingy.swift
| } | ||
|
|
||
| /// Checks if a full snapshot should be forced (every 15 seconds) | ||
| private func checkAndForceFullSnapshot(for frame: SessionReplayFrame) { |
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.
checkAndForceFullSnapshot:
- This is running even while in full mode when it shouldn't be.
- It should only apply to the persisted frames because in memory frames are processed at harvest time.
- I think it needs rethought because the first frame needs to be a full frame not just every 15.
- Maybe doing this and keeping 30 frames but deleting in batches of 15 might work.
- Or coping in some of my changes for chunking that allows for the raw frames to be persisted instead of the processed frames. If we do it this way this logic shouldn't be needed at all. Just process the frames at harvest time.
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.
change to only run in error mode. I've change this to use the sliding window. changed to only use persisted frames.
| // Process buffered frames to file for persistence | ||
| DispatchQueue.global(qos: .background).async { [weak self] in | ||
| guard let self = self else { return } | ||
| self.processFrameToFile(bufferedFrame.frame) |
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.
Aren't these frames already being persisted to file while they're captured?
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.
Yeah but this is capturing them to a seperate error buffer. It seems to work. 🤷
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.
Removed this part. 👍
Triggered by various error types: Handled Exception and LogError and recordError only currently.
When transitioning from error mode to full mode full session replay is enabled.
Full Snapshot Capture:
Session replay is now configured to capture a full snapshot every 15 seconds, ensuring that each replay commences with a comprehensive snapshot.