-
Notifications
You must be signed in to change notification settings - Fork 49
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
feat: manual start/stop session recording #276
Open
ioannisj
wants to merge
15
commits into
main
Choose a base branch
from
feat/start-stop-session-recording
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
8a7a667
chore: add swiftformat config
ioannisj 581a08b
fix: avoid registering for notifications multiple times
ioannisj 5faf328
feat: add session replay automatic start config
ioannisj 9fc8a1e
fix: capture timestamp along with snapshot events
ioannisj ac651e4
feat: add start/stop session recording and refactor session manager
ioannisj 8c18241
fix(ci): use Xcode 16 for unit testing
ioannisj 7edb51b
fix(ci): switch to macos-14 for tests
ioannisj ce0bb4a
fix(ci): tests
ioannisj 241282d
fix: remove start mode from session replay config
ioannisj 23236cc
fix: use timestamp at time of checking as the new session timestamp
ioannisj c06ac99
feat: capture session id on network request start
ioannisj 2d02d50
fix: get session id only after snapshot is generated
ioannisj 25200fe
fix: don't process $snapshot if session id is missing
ioannisj 3225259
fix: remove todo
ioannisj a40fa50
chore: update CHANGELOG
ioannisj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
--acronyms ID,URL,UUID | ||
--allman false | ||
--anonymousforeach convert | ||
--assetliterals visual-width | ||
--asynccapturing | ||
--beforemarks | ||
--binarygrouping none | ||
--callsiteparen default | ||
--categorymark "MARK: %c" | ||
--classthreshold 0 | ||
--closingparen balanced | ||
--closurevoid remove | ||
--commas always | ||
--complexattrs preserve | ||
--computedvarattrs preserve | ||
--condassignment after-property | ||
--conflictmarkers reject | ||
--dateformat system | ||
--decimalgrouping ignore | ||
--doccomments before-declarations | ||
--elseposition same-line | ||
--emptybraces no-space | ||
--enumnamespaces always | ||
--enumthreshold 0 | ||
--exponentcase lowercase | ||
--exponentgrouping disabled | ||
--extensionacl on-extension | ||
--extensionlength 0 | ||
--extensionmark "MARK: - %t + %c" | ||
--fractiongrouping disabled | ||
--fragment false | ||
--funcattributes preserve | ||
--generictypes | ||
--groupedextension "MARK: %c" | ||
--guardelse auto | ||
--header ignore | ||
--hexgrouping 4,8 | ||
--hexliteralcase uppercase | ||
--ifdef indent | ||
--importgrouping alpha | ||
--indent 4 | ||
--indentcase false | ||
--indentstrings false | ||
--initcodernil false | ||
--lifecycle | ||
--lineaftermarks true | ||
--linebreaks lf | ||
--markcategories true | ||
--markextensions always | ||
--marktypes always | ||
--maxwidth none | ||
--modifierorder | ||
--nevertrailing | ||
--nilinit remove | ||
--noncomplexattrs | ||
--nospaceoperators | ||
--nowrapoperators | ||
--octalgrouping none | ||
--onelineforeach ignore | ||
--operatorfunc spaced | ||
--organizationmode visibility | ||
--organizetypes actor,class,enum,struct | ||
--patternlet hoist | ||
--ranges spaced | ||
--redundanttype infer-locals-only | ||
--self remove | ||
--selfrequired | ||
--semicolons never | ||
--shortoptionals except-properties | ||
--smarttabs enabled | ||
--someany true | ||
--storedvarattrs preserve | ||
--stripunusedargs always | ||
--structthreshold 0 | ||
--tabwidth unspecified | ||
--throwcapturing | ||
--timezone system | ||
--trailingclosures | ||
--trimwhitespace always | ||
--typeattributes preserve | ||
--typeblanklines remove | ||
--typedelimiter space-after | ||
--typemark "MARK: - %t" | ||
--voidtype void | ||
--wraparguments preserve | ||
--wrapcollections preserve | ||
--wrapconditions preserve | ||
--wrapeffects preserve | ||
--wrapenumcases always | ||
--wrapparameters default | ||
--wrapreturntype preserve | ||
--wrapternary default | ||
--wraptypealiases preserve | ||
--xcodeindentation disabled | ||
--yodaswap always | ||
--hexgrouping ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// DI.swift | ||
// PostHog | ||
// | ||
// Created by Yiannis Josephides on 17/12/2024. | ||
// | ||
|
||
// swiftlint:disable:next type_name | ||
enum DI { | ||
static var main = Container() | ||
|
||
final class Container { | ||
lazy var appLifecyclePublisher: AppLifecyclePublishing = ApplicationLifecyclePublisher.shared | ||
lazy var sessionManager: PostHogSessionManager = .init() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I added this purely for testing purposes, so that we can easily swap out singletons in the codebase for testing. We can slowly start porting dependencies here