Architecting for Observability in iOS Applications: Building Resilient and Measurable Systems
0 views
Aug 6, 2025
š Conference Website: https://softwarearchitecture.live šŗ CSharp TV - Dev Streaming Destination http://csharp.tv š C# Corner - Community of Software and Data Developers https://www.c-sharpcorner.com #CSharpTV #CSharpCorner #CSharp #SoftwareArchitectureConf
View Video Transcript
0:03
hi everyone welcome to architects in for
0:06
hi everyone welcome to architects in for
0:06
hi everyone welcome to architects in for observability in iOS applications my
0:09
observability in iOS applications my
0:09
observability in iOS applications my name is Sergey msco I'm I team lead with
0:12
name is Sergey msco I'm I team lead with
0:12
name is Sergey msco I'm I team lead with more than eight years of experience
0:15
more than eight years of experience
0:15
more than eight years of experience today I will briefly tell you about
0:17
today I will briefly tell you about
0:17
today I will briefly tell you about observability in mobile applications and
0:20
observability in mobile applications and
0:20
observability in mobile applications and then we'll tell you what you can do in
0:23
then we'll tell you what you can do in
0:23
then we'll tell you what you can do in your iOS applications to make
0:25
your iOS applications to make
0:25
your iOS applications to make implementation of observability easier
0:30
implementation of observability easier
0:30
implementation of observability easier how do we ensure that our application is
0:32
how do we ensure that our application is
0:32
how do we ensure that our application is stable and functioning properly we test
0:35
stable and functioning properly we test
0:36
stable and functioning properly we test it more often this is done by the QA
0:39
it more often this is done by the QA
0:39
it more often this is done by the QA team using various test cases test
0:41
team using various test cases test
0:41
team using various test cases test environments and specific devices but
0:44
environments and specific devices but
0:44
environments and specific devices but such checks are inherently synthetic and
0:48
such checks are inherently synthetic and
0:48
such checks are inherently synthetic and don't always reflect the real world
0:51
don't always reflect the real world
0:51
don't always reflect the real world scenario in reality things are much more
0:54
scenario in reality things are much more
0:54
scenario in reality things are much more complex and observability can help
0:57
complex and observability can help
0:57
complex and observability can help organize real time testing
1:00
organize real time testing
1:00
organize real time testing observability is a term that originated
1:03
observability is a term that originated
1:03
observability is a term that originated from the fields of engineering and
1:05
from the fields of engineering and
1:05
from the fields of engineering and system analysis in the context of
1:07
system analysis in the context of
1:07
system analysis in the context of software development and especially
1:09
software development and especially
1:09
software development and especially mobile applications observability can be
1:12
mobile applications observability can be
1:12
mobile applications observability can be described as the ability of a system to
1:15
described as the ability of a system to
1:15
described as the ability of a system to provide information about its internal
1:17
provide information about its internal
1:17
provide information about its internal State and operation simply put it's a
1:20
State and operation simply put it's a
1:20
State and operation simply put it's a property of the system like to stability
1:23
property of the system like to stability
1:23
property of the system like to stability or security we need to design the system
1:26
or security we need to design the system
1:26
or security we need to design the system in such a way that it benefit from
1:29
in such a way that it benefit from
1:29
in such a way that it benefit from observability meaning the system itself
1:31
observability meaning the system itself
1:31
observability meaning the system itself reports its state and provides details
1:34
reports its state and provides details
1:34
reports its state and provides details in case of
1:36
in case of
1:36
in case of incidents it's important to understand
1:38
incidents it's important to understand
1:38
incidents it's important to understand the traces Matrix and logs by themselves
1:42
the traces Matrix and logs by themselves
1:42
the traces Matrix and logs by themselves are not observability this is just tools
1:45
are not observability this is just tools
1:45
are not observability this is just tools that can help achieve this property true
1:49
that can help achieve this property true
1:49
that can help achieve this property true observability is built upon aggregating
1:51
observability is built upon aggregating
1:51
observability is built upon aggregating all collected information in one place
1:54
all collected information in one place
1:55
all collected information in one place where it can be analyzed visualized
1:58
where it can be analyzed visualized
1:58
where it can be analyzed visualized through graphs or dashboards
2:00
through graphs or dashboards
2:00
through graphs or dashboards and where alerts can be set up to
2:02
and where alerts can be set up to
2:02
and where alerts can be set up to trigger when the number of incidents
2:05
trigger when the number of incidents
2:05
trigger when the number of incidents increases good observability allows a
2:08
increases good observability allows a
2:08
increases good observability allows a team not to quickly respond to emerging
2:11
team not to quickly respond to emerging
2:11
team not to quickly respond to emerging issues but also to anticipate them this
2:14
issues but also to anticipate them this
2:14
issues but also to anticipate them this means the system itself hints at what is
2:17
means the system itself hints at what is
2:17
means the system itself hints at what is wrong and helps identify the cause
2:20
wrong and helps identify the cause
2:20
wrong and helps identify the cause immediately imagine not having to figure
2:23
immediately imagine not having to figure
2:23
immediately imagine not having to figure out where exactly an error occured and
2:26
out where exactly an error occured and
2:26
out where exactly an error occured and what caused it the system directly
2:29
what caused it the system directly
2:29
what caused it the system directly informs you
2:31
informs you
2:31
informs you observability is a key tool for creating
2:33
observability is a key tool for creating
2:33
observability is a key tool for creating reliable and resilent mobile
2:36
reliable and resilent mobile
2:36
reliable and resilent mobile applications it minimizes the time
2:38
applications it minimizes the time
2:38
applications it minimizes the time needed to detect and fix issues thereby
2:41
needed to detect and fix issues thereby
2:42
needed to detect and fix issues thereby improving the overall user experience
2:44
improving the overall user experience
2:45
improving the overall user experience you can learn about the problem from
2:46
you can learn about the problem from
2:46
you can learn about the problem from users when they start complaining but
2:49
users when they start complaining but
2:49
users when they start complaining but observability helps solve two crucial
2:52
observability helps solve two crucial
2:52
observability helps solve two crucial aspects you learn about the problem
2:54
aspects you learn about the problem
2:54
aspects you learn about the problem before it becomes critical and you have
2:57
before it becomes critical and you have
2:57
before it becomes critical and you have complete information and can immediately
3:00
complete information and can immediately
3:00
complete information and can immediately start resolving the issue without
3:02
start resolving the issue without
3:02
start resolving the issue without needing to GA data from various
3:05
needing to GA data from various
3:05
needing to GA data from various sources to summarize with good
3:08
sources to summarize with good
3:08
sources to summarize with good observability in your project you don't
3:10
observability in your project you don't
3:10
observability in your project you don't just find out that a problem occurred
3:12
just find out that a problem occurred
3:12
just find out that a problem occurred but you immediately get all the
3:14
but you immediately get all the
3:14
but you immediately get all the necessary information to solve it the
3:17
necessary information to solve it the
3:17
necessary information to solve it the system fully reports its state and the
3:20
system fully reports its state and the
3:20
system fully reports its state and the causes of any issues allowing you to
3:23
causes of any issues allowing you to
3:23
causes of any issues allowing you to take action promptly however it's
3:26
take action promptly however it's
3:26
take action promptly however it's important to remember that observability
3:28
important to remember that observability
3:28
important to remember that observability does not replace classic test
3:30
does not replace classic test
3:30
does not replace classic test synthetic checks are still necessary the
3:33
synthetic checks are still necessary the
3:33
synthetic checks are still necessary the topic of observability is widely known
3:36
topic of observability is widely known
3:36
topic of observability is widely known among backend developers and devops
3:38
among backend developers and devops
3:38
among backend developers and devops Engineers however in mobile application
3:41
Engineers however in mobile application
3:41
Engineers however in mobile application development this topic is often
3:44
development this topic is often
3:44
development this topic is often overlooked even though many teams and
3:46
overlooked even though many teams and
3:46
overlooked even though many teams and projects have already made steps towards
3:49
projects have already made steps towards
3:49
projects have already made steps towards observability perhaps even without
3:52
observability perhaps even without
3:52
observability perhaps even without realizing it let's imagine a
3:56
realizing it let's imagine a
3:56
realizing it let's imagine a hypothetical project an i application
3:59
hypothetical project an i application
3:59
hypothetical project an i application the team that developed it didn't
4:01
the team that developed it didn't
4:01
the team that developed it didn't integrate analytics loging crashlytics
4:04
integrate analytics loging crashlytics
4:04
integrate analytics loging crashlytics or other monitoring tools it's just a
4:07
or other monitoring tools it's just a
4:07
or other monitoring tools it's just a project with a set of features after
4:09
project with a set of features after
4:09
project with a set of features after releasing a new version users began to
4:12
releasing a new version users began to
4:12
releasing a new version users began to report that app is not working it
4:15
report that app is not working it
4:15
report that app is not working it crashes by itself or when I open the
4:18
crashes by itself or when I open the
4:18
crashes by itself or when I open the second screen the app crashes these
4:21
second screen the app crashes these
4:21
second screen the app crashes these reviews indicate that something went
4:23
reviews indicate that something went
4:23
reviews indicate that something went wrong but don't provide Clarity on what
4:26
wrong but don't provide Clarity on what
4:26
wrong but don't provide Clarity on what exactly and why the team tried to
4:28
exactly and why the team tried to
4:28
exactly and why the team tried to reproduce the problem but found nothing
4:31
reproduce the problem but found nothing
4:31
reproduce the problem but found nothing unusual the app seemed to work fine in
4:35
unusual the app seemed to work fine in
4:35
unusual the app seemed to work fine in their
4:36
their
4:36
their environment however users continued to
4:38
environment however users continued to
4:38
environment however users continued to complain suggesting a possible crash but
4:42
complain suggesting a possible crash but
4:42
complain suggesting a possible crash but since the team couldn't reproduce it
4:45
since the team couldn't reproduce it
4:45
since the team couldn't reproduce it they were left to work blindly release
4:47
they were left to work blindly release
4:47
they were left to work blindly release new version and hope it works as example
4:51
new version and hope it works as example
4:51
new version and hope it works as example this situation could have been easily
4:54
this situation could have been easily
4:54
this situation could have been easily solved if the app had been set up with
4:56
solved if the app had been set up with
4:56
solved if the app had been set up with scat litics to catch crashes and send
4:59
scat litics to catch crashes and send
4:59
scat litics to catch crashes and send information about them in the world of
5:02
information about them in the world of
5:02
information about them in the world of iOS development Apple already provide
5:04
iOS development Apple already provide
5:05
iOS development Apple already provide such functionality out of the box but
5:07
such functionality out of the box but
5:07
such functionality out of the box but with search and limitations for greater
5:09
with search and limitations for greater
5:09
with search and limitations for greater flexibility developers often turn to
5:12
flexibility developers often turn to
5:12
flexibility developers often turn to third party services like Firebase crash
5:15
third party services like Firebase crash
5:15
third party services like Firebase crash litics today collecting CR information
5:18
litics today collecting CR information
5:18
litics today collecting CR information has become a standard practice that
5:20
has become a standard practice that
5:20
has become a standard practice that allows teams to learn about issues
5:23
allows teams to learn about issues
5:23
allows teams to learn about issues before user starts complaining in large
5:26
before user starts complaining in large
5:26
before user starts complaining in large numbers while also providing data on the
5:28
numbers while also providing data on the
5:28
numbers while also providing data on the causes of the issues such as stack
5:31
causes of the issues such as stack
5:31
causes of the issues such as stack traces and Technical information about
5:33
traces and Technical information about
5:33
traces and Technical information about the device by working with Crush litics
5:36
the device by working with Crush litics
5:36
the device by working with Crush litics teams are already taking that step
5:38
teams are already taking that step
5:38
teams are already taking that step toward
5:40
toward
5:40
toward observability however crashes are far
5:42
observability however crashes are far
5:42
observability however crashes are far from the only problem that can lead to
5:44
from the only problem that can lead to
5:44
from the only problem that can lead to user complaints or wors cause a drop in
5:47
user complaints or wors cause a drop in
5:48
user complaints or wors cause a drop in key metric and revenue the more complex
5:50
key metric and revenue the more complex
5:50
key metric and revenue the more complex the system becomes the more dependent
5:53
the system becomes the more dependent
5:53
the system becomes the more dependent parameters it includes the more diverse
5:55
parameters it includes the more diverse
5:55
parameters it includes the more diverse the devices and OS version it supports
5:58
the devices and OS version it supports
5:59
the devices and OS version it supports the less transparent it becomes in
6:01
the less transparent it becomes in
6:01
the less transparent it becomes in understanding how the app behaves in
6:03
understanding how the app behaves in
6:03
understanding how the app behaves in real world conditions for example if a
6:06
real world conditions for example if a
6:06
real world conditions for example if a project uses feature fles to manage the
6:08
project uses feature fles to manage the
6:08
project uses feature fles to manage the availability of features and the
6:10
availability of features and the
6:10
availability of features and the configuration system doesn't validate
6:13
configuration system doesn't validate
6:13
configuration system doesn't validate changes so a product manager or business
6:16
changes so a product manager or business
6:16
changes so a product manager or business analyst could accidentally make an error
6:19
analyst could accidentally make an error
6:19
analyst could accidentally make an error such as miscast the data format or skip
6:22
such as miscast the data format or skip
6:22
such as miscast the data format or skip an important field this could result in
6:25
an important field this could result in
6:25
an important field this could result in users not receiving certain
6:28
users not receiving certain
6:28
users not receiving certain functionalities even though the server
6:30
functionalities even though the server
6:30
functionalities even though the server and crash litics don't register any
6:33
and crash litics don't register any
6:33
and crash litics don't register any issues moreover given the complexity of
6:36
issues moreover given the complexity of
6:36
issues moreover given the complexity of modern systems it's impossible to test
6:39
modern systems it's impossible to test
6:39
modern systems it's impossible to test and simulate every possible usage
6:41
and simulate every possible usage
6:41
and simulate every possible usage scenario for example you might release
6:44
scenario for example you might release
6:44
scenario for example you might release several new features simultaneously
6:46
several new features simultaneously
6:46
several new features simultaneously everything works fine in the test
6:48
everything works fine in the test
6:48
everything works fine in the test environment so you release the update
6:52
environment so you release the update
6:52
environment so you release the update however on real devices under certain
6:54
however on real devices under certain
6:55
however on real devices under certain conditions such as specific phone model
6:57
conditions such as specific phone model
6:57
conditions such as specific phone model iOS version internal app settings and
7:00
iOS version internal app settings and
7:00
iOS version internal app settings and other many user might experience issues
7:04
other many user might experience issues
7:04
other many user might experience issues for instance the app may take a long
7:07
for instance the app may take a long
7:07
for instance the app may take a long time to load or critical flows like
7:09
time to load or critical flows like
7:09
time to load or critical flows like registration may start to fail and you
7:12
registration may start to fail and you
7:12
registration may start to fail and you will see nothing on Crash litics because
7:14
will see nothing on Crash litics because
7:14
will see nothing on Crash litics because there are no crashes so just like with
7:18
there are no crashes so just like with
7:18
there are no crashes so just like with crashes you need to build metrics for
7:21
crashes you need to build metrics for
7:21
crashes you need to build metrics for other aspects of the apps performance
7:24
other aspects of the apps performance
7:24
other aspects of the apps performance and stability to determine where to
7:26
and stability to determine where to
7:26
and stability to determine where to start building metrics I suggest
7:28
start building metrics I suggest
7:28
start building metrics I suggest focusing on three key aspects first is
7:33
focusing on three key aspects first is
7:33
focusing on three key aspects first is important user stories for example
7:36
important user stories for example
7:36
important user stories for example registration login payment processing
7:39
registration login payment processing
7:39
registration login payment processing sending messages generating resources
7:42
sending messages generating resources
7:42
sending messages generating resources search results and Etc it's important to
7:45
search results and Etc it's important to
7:45
search results and Etc it's important to consider not only whether these flows
7:48
consider not only whether these flows
7:48
consider not only whether these flows are functioning but also how well they
7:51
are functioning but also how well they
7:51
are functioning but also how well they performing as example how quickly
7:54
performing as example how quickly
7:54
performing as example how quickly payments are protest or how quickly
7:56
payments are protest or how quickly
7:56
payments are protest or how quickly messages are sent next pass flows
8:01
messages are sent next pass flows
8:01
messages are sent next pass flows features stories that dependent heavily
8:04
features stories that dependent heavily
8:04
features stories that dependent heavily on Dynamic changing arguments as example
8:08
on Dynamic changing arguments as example
8:08
on Dynamic changing arguments as example feature Flags country codes and
8:11
feature Flags country codes and
8:11
feature Flags country codes and location and flows features and stories
8:15
location and flows features and stories
8:15
location and flows features and stories dependent on external systems this could
8:18
dependent on external systems this could
8:18
dependent on external systems this could be a third party apis or Services as
8:20
be a third party apis or Services as
8:20
be a third party apis or Services as well as internal systems developed by
8:23
well as internal systems developed by
8:23
well as internal systems developed by another team within your company it's
8:25
another team within your company it's
8:25
another team within your company it's not guaranteed that these teams consider
8:28
not guaranteed that these teams consider
8:28
not guaranteed that these teams consider potential issues that might affect your
8:30
potential issues that might affect your
8:30
potential issues that might affect your specific app as opposed to the entire
8:33
specific app as opposed to the entire
8:33
specific app as opposed to the entire system this part of the talk provides a
8:35
system this part of the talk provides a
8:35
system this part of the talk provides a general idea of what observability can
8:38
general idea of what observability can
8:38
general idea of what observability can look like in mobile application in the
8:40
look like in mobile application in the
8:41
look like in mobile application in the next section we will explore
8:42
next section we will explore
8:42
next section we will explore architectural Solutions of the iOS site
8:45
architectural Solutions of the iOS site
8:45
architectural Solutions of the iOS site that can help you implement
8:46
that can help you implement
8:46
that can help you implement observability in your app I recommend
8:49
observability in your app I recommend
8:49
observability in your app I recommend exploring articles talks and other
8:51
exploring articles talks and other
8:51
exploring articles talks and other materials not limiting yourself to
8:54
materials not limiting yourself to
8:54
materials not limiting yourself to mobile development the experience and
8:56
mobile development the experience and
8:56
mobile development the experience and approaches of devops and backend
8:58
approaches of devops and backend
8:58
approaches of devops and backend developers can be be very
9:01
developers can be be very
9:01
developers can be be very valuable achieving good observability
9:03
valuable achieving good observability
9:03
valuable achieving good observability means not only knowing that a problem
9:06
means not only knowing that a problem
9:06
means not only knowing that a problem has occured in your system but also
9:09
has occured in your system but also
9:09
has occured in your system but also providing details that explaining what
9:11
providing details that explaining what
9:11
providing details that explaining what exactly went
9:12
exactly went
9:12
exactly went wrong one way to gather such information
9:16
wrong one way to gather such information
9:16
wrong one way to gather such information is by using
9:18
is by using
9:18
is by using logs while metrics provide a general
9:21
logs while metrics provide a general
9:21
logs while metrics provide a general overview of the system State locks
9:23
overview of the system State locks
9:23
overview of the system State locks collect detailed information about what
9:26
collect detailed information about what
9:26
collect detailed information about what happened on the user device what actions
9:29
happened on the user device what actions
9:29
happened on the user device what actions they took and what might have caused the
9:32
they took and what might have caused the
9:32
they took and what might have caused the problem it's crucial to remember that
9:34
problem it's crucial to remember that
9:34
problem it's crucial to remember that any tools for achieving observability
9:36
any tools for achieving observability
9:36
any tools for achieving observability adds overhead and locks are like one of
9:40
adds overhead and locks are like one of
9:40
adds overhead and locks are like one of the heaviest tools so let's see how we
9:43
the heaviest tools so let's see how we
9:43
the heaviest tools so let's see how we can collect and deliver logs first of
9:46
can collect and deliver logs first of
9:46
can collect and deliver logs first of all we can use live for onl mode in this
9:50
all we can use live for onl mode in this
9:50
all we can use live for onl mode in this mode logs are sent immediately after
9:52
mode logs are sent immediately after
9:52
mode logs are sent immediately after they are recorded in the application in
9:55
they are recorded in the application in
9:55
they are recorded in the application in real time this often used in the backend
9:57
real time this often used in the backend
9:57
real time this often used in the backend development but may not be the best
10:00
development but may not be the best
10:00
development but may not be the best option for mobile applications as you'll
10:03
option for mobile applications as you'll
10:03
option for mobile applications as you'll receive logs even everything is working
10:05
receive logs even everything is working
10:05
receive logs even everything is working fine for the user this creates a large
10:08
fine for the user this creates a large
10:08
fine for the user this creates a large amount of unnecessary data which can be
10:11
amount of unnecessary data which can be
10:11
amount of unnecessary data which can be difficult to process and store however
10:14
difficult to process and store however
10:14
difficult to process and store however it's possible to configurate the system
10:16
it's possible to configurate the system
10:16
it's possible to configurate the system so that logs are only sent when a
10:18
so that logs are only sent when a
10:18
so that logs are only sent when a specific flock is activated in the app
10:21
specific flock is activated in the app
10:21
specific flock is activated in the app or when a trigger event occurs it's
10:23
or when a trigger event occurs it's
10:23
or when a trigger event occurs it's essential to test this logic to avoid
10:26
essential to test this logic to avoid
10:26
essential to test this logic to avoid errors that could lead to either losing
10:28
errors that could lead to either losing
10:28
errors that could lead to either losing all Lo
10:29
all Lo
10:29
all Lo or being overwhelmed with unnecessary
10:33
or being overwhelmed with unnecessary
10:33
or being overwhelmed with unnecessary data next is on demand there are two sub
10:37
data next is on demand there are two sub
10:37
data next is on demand there are two sub approaches here first automatic where
10:40
approaches here first automatic where
10:40
approaches here first automatic where through a login flag which user receives
10:43
through a login flag which user receives
10:43
through a login flag which user receives upon entering the app indicating that
10:45
upon entering the app indicating that
10:45
upon entering the app indicating that locks should be sent or we are a push
10:48
locks should be sent or we are a push
10:48
locks should be sent or we are a push notification that also prompts the app
10:50
notification that also prompts the app
10:51
notification that also prompts the app to send locks or we can do it manually
10:54
to send locks or we can do it manually
10:54
to send locks or we can do it manually the user can select an option in the
10:56
the user can select an option in the
10:56
the user can select an option in the menu to send logs upon your request
10:59
menu to send logs upon your request
10:59
menu to send logs upon your request and the last one is trigger it logs can
11:03
and the last one is trigger it logs can
11:03
and the last one is trigger it logs can be automatically sent when a specific
11:05
be automatically sent when a specific
11:05
be automatically sent when a specific event occurs in application such as
11:08
event occurs in application such as
11:08
event occurs in application such as crash or critical error and how we can
11:10
crash or critical error and how we can
11:11
crash or critical error and how we can collect our logs first of all we can
11:13
collect our logs first of all we can
11:13
collect our logs first of all we can make continuous collection logs are
11:16
make continuous collection logs are
11:16
make continuous collection logs are recorded continuously but it's important
11:19
recorded continuously but it's important
11:19
recorded continuously but it's important to consider next things avoid recording
11:22
to consider next things avoid recording
11:22
to consider next things avoid recording too many logs at once to prevent
11:24
too many logs at once to prevent
11:24
too many logs at once to prevent overloading the disk with fre right
11:26
overloading the disk with fre right
11:26
overloading the disk with fre right operations Implement loog file rotation
11:29
operations Implement loog file rotation
11:29
operations Implement loog file rotation to prevent them from becoming too large
11:32
to prevent them from becoming too large
11:32
to prevent them from becoming too large for example you can set a file size
11:34
for example you can set a file size
11:34
for example you can set a file size limit of 20 mbes after which all data is
11:38
limit of 20 mbes after which all data is
11:38
limit of 20 mbes after which all data is either cleared or overwritten and
11:41
either cleared or overwritten and
11:41
either cleared or overwritten and carefully manage login levels the
11:43
carefully manage login levels the
11:44
carefully manage login levels the backlogs which are useful for testing
11:46
backlogs which are useful for testing
11:46
backlogs which are useful for testing and better versions should not be
11:48
and better versions should not be
11:48
and better versions should not be included in continuous login for release
11:51
included in continuous login for release
11:51
included in continuous login for release versions on demand Lo collection can be
11:54
versions on demand Lo collection can be
11:54
versions on demand Lo collection can be activated manually by the users through
11:56
activated manually by the users through
11:56
activated manually by the users through settings or automatically via login flag
11:59
settings or automatically via login flag
11:59
settings or automatically via login flag and push notification and Trigger it
12:02
and push notification and Trigger it
12:02
and push notification and Trigger it just like with delivery a trigger event
12:05
just like with delivery a trigger event
12:05
just like with delivery a trigger event can start the log recording process the
12:08
can start the log recording process the
12:08
can start the log recording process the last two approaches are quite convenient
12:11
last two approaches are quite convenient
12:11
last two approaches are quite convenient especially when dealing with specific
12:13
especially when dealing with specific
12:13
especially when dealing with specific issues incured by individual users
12:17
issues incured by individual users
12:17
issues incured by individual users however these methods have drawbacks for
12:20
however these methods have drawbacks for
12:20
however these methods have drawbacks for example you might miss the initial
12:22
example you might miss the initial
12:22
example you might miss the initial problem because the locks will only
12:24
problem because the locks will only
12:24
problem because the locks will only start recording after you've identified
12:27
start recording after you've identified
12:27
start recording after you've identified the issue and ask the US user to enable
12:30
the issue and ask the US user to enable
12:30
the issue and ask the US user to enable the loog
12:31
the loog
12:31
the loog collection in such cases the root cause
12:34
collection in such cases the root cause
12:34
collection in such cases the root cause of the problem may be lost but also you
12:37
of the problem may be lost but also you
12:37
of the problem may be lost but also you can Implement a combination of login
12:39
can Implement a combination of login
12:39
can Implement a combination of login approaches for example loging at the
12:42
approaches for example loging at the
12:42
approaches for example loging at the error warning and critical levels can
12:44
error warning and critical levels can
12:44
error warning and critical levels can happen continuously while more detailed
12:47
happen continuously while more detailed
12:47
happen continuously while more detailed logs info and notice can be enabled when
12:51
logs info and notice can be enabled when
12:51
logs info and notice can be enabled when a trigger occurs upon user request or
12:54
a trigger occurs upon user request or
12:54
a trigger occurs upon user request or via a login flag this approach helps
12:56
via a login flag this approach helps
12:56
via a login flag this approach helps maintain a balance between having
12:59
maintain a balance between having
12:59
maintain a balance between having detailed information and optimizing the
13:01
detailed information and optimizing the
13:01
detailed information and optimizing the cost of storing and processing
13:04
cost of storing and processing
13:04
cost of storing and processing logs how we can write logs in iOS
13:07
logs how we can write logs in iOS
13:07
logs how we can write logs in iOS devices first of all we can use Apple's
13:09
devices first of all we can use Apple's
13:09
devices first of all we can use Apple's OS loog apple offers this powerful tool
13:13
OS loog apple offers this powerful tool
13:13
OS loog apple offers this powerful tool that includes many optimizations for
13:15
that includes many optimizations for
13:15
that includes many optimizations for fast performance with deep integration
13:18
fast performance with deep integration
13:18
fast performance with deep integration into the operation system and support
13:20
into the operation system and support
13:20
into the operation system and support for privacy tools however for our
13:23
for privacy tools however for our
13:23
for privacy tools however for our purposes it may be inconvenient these
13:26
purposes it may be inconvenient these
13:26
purposes it may be inconvenient these locks can be difficult to access there
13:29
locks can be difficult to access there
13:29
locks can be difficult to access there are three ways first we can connect the
13:32
are three ways first we can connect the
13:32
are three ways first we can connect the phone to a computer and view the console
13:34
phone to a computer and view the console
13:34
phone to a computer and view the console which is not so comfortable for the
13:36
which is not so comfortable for the
13:36
which is not so comfortable for the users second we can collect a system
13:40
users second we can collect a system
13:40
users second we can collect a system diagnostic of the entire device but it
13:43
diagnostic of the entire device but it
13:43
diagnostic of the entire device but it takes up to 15 minutes to collect and
13:47
takes up to 15 minutes to collect and
13:47
takes up to 15 minutes to collect and results in more than 200 megab
13:50
results in more than 200 megab
13:50
results in more than 200 megab archive and also we can get the locks
13:54
archive and also we can get the locks
13:54
archive and also we can get the locks programmatically from the app but there
13:56
programmatically from the app but there
13:56
programmatically from the app but there is a drawback you can only get locks
13:59
is a drawback you can only get locks
13:59
is a drawback you can only get locks from the current process this means you
14:01
from the current process this means you
14:01
from the current process this means you can't retrieve logs from extensions or
14:04
can't retrieve logs from extensions or
14:04
can't retrieve logs from extensions or from previous launches of the
14:06
from previous launches of the
14:06
from previous launches of the application so I'm suggest you not to
14:09
application so I'm suggest you not to
14:09
application so I'm suggest you not to continue with OS log so another approach
14:12
continue with OS log so another approach
14:13
continue with OS log so another approach is to write logs to a text file you can
14:15
is to write logs to a text file you can
14:15
is to write logs to a text file you can start by using an existing framework for
14:18
start by using an existing framework for
14:18
start by using an existing framework for example Swift bber which writes logs to
14:20
example Swift bber which writes logs to
14:20
example Swift bber which writes logs to a file later when you become more
14:23
a file later when you become more
14:23
a file later when you become more familiar with login and understand units
14:26
familiar with login and understand units
14:26
familiar with login and understand units you can modify it since it's open source
14:29
you can modify it since it's open source
14:29
you can modify it since it's open source or Implement your own solution as it's
14:31
or Implement your own solution as it's
14:31
or Implement your own solution as it's quite simple just write into a file or
14:35
quite simple just write into a file or
14:35
quite simple just write into a file or you can write logs in Firebase crash
14:37
you can write logs in Firebase crash
14:37
you can write logs in Firebase crash lytics by default Firebase crashlytics
14:40
lytics by default Firebase crashlytics
14:40
lytics by default Firebase crashlytics is used to catch crashes and send stack
14:43
is used to catch crashes and send stack
14:43
is used to catch crashes and send stack traces and device information but you
14:46
traces and device information but you
14:46
traces and device information but you can also log additional data such as
14:48
can also log additional data such as
14:48
can also log additional data such as information about subscriptions or user
14:51
information about subscriptions or user
14:51
information about subscriptions or user roles this allows you to more accurately
14:54
roles this allows you to more accurately
14:54
roles this allows you to more accurately identify the context in which the error
14:56
identify the context in which the error
14:56
identify the context in which the error occured and potentially find a solution
14:59
occured and potentially find a solution
14:59
occured and potentially find a solution more quickly you can also write logs to
15:02
more quickly you can also write logs to
15:02
more quickly you can also write logs to Firebase crash lytics which will be sent
15:05
Firebase crash lytics which will be sent
15:05
Firebase crash lytics which will be sent along with the crash report you can also
15:08
along with the crash report you can also
15:08
along with the crash report you can also send a nonfatal band that includes all
15:10
send a nonfatal band that includes all
15:10
send a nonfatal band that includes all the
15:11
the
15:11
the information however since Firebase is a
15:14
information however since Firebase is a
15:14
information however since Firebase is a free service it has limitations such as
15:17
free service it has limitations such as
15:17
free service it has limitations such as data sampling so not all events are
15:19
data sampling so not all events are
15:19
data sampling so not all events are saved and a limited number of log times
15:23
saved and a limited number of log times
15:23
saved and a limited number of log times before an error
15:25
before an error
15:25
before an error occurs Additionally you cannot run
15:28
occurs Additionally you cannot run
15:28
occurs Additionally you cannot run custom SQL qus to retrieve the specific
15:31
custom SQL qus to retrieve the specific
15:31
custom SQL qus to retrieve the specific data you
15:33
data you
15:33
data you need therefore it's not advisable to
15:36
need therefore it's not advisable to
15:36
need therefore it's not advisable to rely on a free services for too long you
15:38
rely on a free services for too long you
15:38
rely on a free services for too long you should consider more specialized
15:40
should consider more specialized
15:40
should consider more specialized Solutions or build your own however
15:43
Solutions or build your own however
15:43
Solutions or build your own however Firebase Crush lytics can be sufficient
15:45
Firebase Crush lytics can be sufficient
15:45
Firebase Crush lytics can be sufficient for a
15:47
for a
15:47
for a start and I want to give you few General
15:50
start and I want to give you few General
15:50
start and I want to give you few General advices for writing logs to a text
15:53
advices for writing logs to a text
15:53
advices for writing logs to a text file Define a login policy and use login
15:58
file Define a login policy and use login
15:58
file Define a login policy and use login levels appropri
15:59
levels appropri
15:59
levels appropri rely it's important to consider how
16:02
rely it's important to consider how
16:02
rely it's important to consider how these levels will be used and to monitor
16:04
these levels will be used and to monitor
16:04
these levels will be used and to monitor the amount of logging during code review
16:07
the amount of logging during code review
16:07
the amount of logging during code review this helps prevent situations where too
16:09
this helps prevent situations where too
16:09
this helps prevent situations where too many logs are recorded at once which can
16:12
many logs are recorded at once which can
16:12
many logs are recorded at once which can negatively impact the system and the dis
16:16
negatively impact the system and the dis
16:16
negatively impact the system and the dis this task is as crucial as controlling
16:19
this task is as crucial as controlling
16:19
this task is as crucial as controlling the number of network requests or
16:21
the number of network requests or
16:21
the number of network requests or database ques as the application
16:24
database ques as the application
16:24
database ques as the application functionality grows to prevent logs from
16:27
functionality grows to prevent logs from
16:27
functionality grows to prevent logs from being included in release bill and cause
16:29
being included in release bill and cause
16:29
being included in release bill and cause an unnecessary overhead you can use prep
16:32
an unnecessary overhead you can use prep
16:32
an unnecessary overhead you can use prep processor directives like if defined
16:36
processor directives like if defined
16:36
processor directives like if defined instead of adding if defined to every
16:39
instead of adding if defined to every
16:39
instead of adding if defined to every login statement you can optimize the
16:41
login statement you can optimize the
16:41
login statement you can optimize the login function itself if defined thetive
16:45
login function itself if defined thetive
16:45
login function itself if defined thetive is enabled the login code is executed if
16:48
is enabled the login code is executed if
16:48
is enabled the login code is executed if not the function remains
16:51
not the function remains
16:51
not the function remains empty for example this can be done for
16:53
empty for example this can be done for
16:53
empty for example this can be done for the debug level logs this allows Swift
16:56
the debug level logs this allows Swift
16:56
the debug level logs this allows Swift compiler to exclude Anne calls in the
16:59
compiler to exclude Anne calls in the
17:00
compiler to exclude Anne calls in the release build ensuring high
17:02
release build ensuring high
17:02
release build ensuring high performance and also use outer closure
17:06
performance and also use outer closure
17:06
performance and also use outer closure in your login functions specify the
17:09
in your login functions specify the
17:09
in your login functions specify the argument that passes the log text as
17:11
argument that passes the log text as
17:11
argument that passes the log text as outter closure this allows you to delay
17:14
outter closure this allows you to delay
17:14
outter closure this allows you to delay the avaluation of the argument until
17:17
the avaluation of the argument until
17:17
the avaluation of the argument until it's actually
17:18
it's actually
17:18
it's actually needed if logging of this level is not
17:21
needed if logging of this level is not
17:21
needed if logging of this level is not enabled the evaluation of thebank
17:24
enabled the evaluation of thebank
17:24
enabled the evaluation of thebank descriptions will not occur reducing the
17:26
descriptions will not occur reducing the
17:26
descriptions will not occur reducing the system load while Lo indeed provide a
17:30
system load while Lo indeed provide a
17:30
system load while Lo indeed provide a lot of useful information they can be
17:33
lot of useful information they can be
17:33
lot of useful information they can be cumbersome due to their big volume
17:36
cumbersome due to their big volume
17:36
cumbersome due to their big volume therefore it's important to consider
17:38
therefore it's important to consider
17:38
therefore it's important to consider where is
17:39
where is
17:39
where is optimizations one such approach is to
17:41
optimizations one such approach is to
17:41
optimizations one such approach is to transmit a detailed state of the
17:43
transmit a detailed state of the
17:43
transmit a detailed state of the application instead of full logs for
17:46
application instead of full logs for
17:46
application instead of full logs for example you could send information about
17:49
example you could send information about
17:49
example you could send information about which screens the user navigated through
17:52
which screens the user navigated through
17:52
which screens the user navigated through which API requests were made what
17:55
which API requests were made what
17:55
which API requests were made what settings were configured and which key
17:57
settings were configured and which key
17:57
settings were configured and which key business logic F where
18:00
business logic F where
18:00
business logic F where set let's consider an example of
18:02
set let's consider an example of
18:02
set let's consider an example of notification service extension this
18:05
notification service extension this
18:05
notification service extension this extension is trigger it when a push
18:07
extension is trigger it when a push
18:07
extension is trigger it when a push notification with a specific flock is
18:10
notification with a specific flock is
18:10
notification with a specific flock is received the system then allows us to
18:13
received the system then allows us to
18:13
received the system then allows us to modify the content of the notification
18:16
modify the content of the notification
18:16
modify the content of the notification or even generate multiple notifications
18:19
or even generate multiple notifications
18:19
or even generate multiple notifications instead of one for our business logic we
18:23
instead of one for our business logic we
18:23
instead of one for our business logic we might take an HTTP request to our API
18:26
might take an HTTP request to our API
18:26
might take an HTTP request to our API query a database save changes and much
18:30
query a database save changes and much
18:30
query a database save changes and much more however there is a catch iOS
18:33
more however there is a catch iOS
18:33
more however there is a catch iOS strictly enforces a 24 MB RAM limit for
18:37
strictly enforces a 24 MB RAM limit for
18:37
strictly enforces a 24 MB RAM limit for your
18:38
your
18:38
your extension if you exceeded this limit the
18:41
extension if you exceeded this limit the
18:41
extension if you exceeded this limit the system will immediately terminate your
18:43
system will immediately terminate your
18:43
system will immediately terminate your process without any
18:44
process without any
18:44
process without any notification this means the user won't
18:47
notification this means the user won't
18:47
notification this means the user won't even know that something went wrong and
18:49
even know that something went wrong and
18:49
even know that something went wrong and no events will be locked in your metric
18:52
no events will be locked in your metric
18:52
no events will be locked in your metric or cres reporting tools knowing that the
18:55
or cres reporting tools knowing that the
18:55
or cres reporting tools knowing that the notification service extension is not
18:57
notification service extension is not
18:57
notification service extension is not fully executed is not enough it's
19:00
fully executed is not enough it's
19:00
fully executed is not enough it's crucial to know at which stage it fails
19:04
crucial to know at which stage it fails
19:04
crucial to know at which stage it fails so we need to track every step of our
19:07
so we need to track every step of our
19:07
so we need to track every step of our process send some kind of result and
19:09
process send some kind of result and
19:09
process send some kind of result and ensure that we don't introduce so much
19:12
ensure that we don't introduce so much
19:12
ensure that we don't introduce so much overhead that we ourselves become the
19:14
overhead that we ourselves become the
19:15
overhead that we ourselves become the cause of exceeding the Run
19:17
cause of exceeding the Run
19:17
cause of exceeding the Run limit a simple solution is to use an
19:19
limit a simple solution is to use an
19:20
limit a simple solution is to use an option set where each bit represents a
19:22
option set where each bit represents a
19:22
option set where each bit represents a specific step in the notification
19:24
specific step in the notification
19:24
specific step in the notification service extension process and one of
19:27
service extension process and one of
19:27
service extension process and one of these bits indicat that the the
19:29
these bits indicat that the the
19:29
these bits indicat that the the extension has reached its logical
19:31
extension has reached its logical
19:31
extension has reached its logical conclusion if we complete a step we set
19:34
conclusion if we complete a step we set
19:34
conclusion if we complete a step we set the corresponding bit to one each time a
19:37
the corresponding bit to one each time a
19:37
the corresponding bit to one each time a change occurs we should save the option
19:39
change occurs we should save the option
19:39
change occurs we should save the option set value to dis then on the next Lounge
19:42
set value to dis then on the next Lounge
19:42
set value to dis then on the next Lounge we can check the value of the last
19:45
we can check the value of the last
19:45
we can check the value of the last option set to determine whether all
19:47
option set to determine whether all
19:47
option set to determine whether all necessary steps were completed and if
19:50
necessary steps were completed and if
19:50
necessary steps were completed and if the process reached its send if we
19:54
the process reached its send if we
19:54
the process reached its send if we detect any deviation we can send a
19:56
detect any deviation we can send a
19:56
detect any deviation we can send a metric this way you can see if your
19:59
metric this way you can see if your
19:59
metric this way you can see if your extension frequently incurrent at errors
20:02
extension frequently incurrent at errors
20:02
extension frequently incurrent at errors or is being terminated by the system due
20:05
or is being terminated by the system due
20:05
or is being terminated by the system due to exceeding the r limit those instead
20:07
to exceeding the r limit those instead
20:07
to exceeding the r limit those instead of large volume of logs you can focus on
20:10
of large volume of logs you can focus on
20:10
of large volume of logs you can focus on capturing specific key events and states
20:13
capturing specific key events and states
20:13
capturing specific key events and states which will not only safe resources but
20:16
which will not only safe resources but
20:16
which will not only safe resources but also simplified data
20:18
also simplified data
20:18
also simplified data analysis with a well structured
20:20
analysis with a well structured
20:20
analysis with a well structured architecture in your application
20:22
architecture in your application
20:22
architecture in your application implementing various matrics becomes
20:25
implementing various matrics becomes
20:25
implementing various matrics becomes much easier honestly there is nothing
20:28
much easier honestly there is nothing
20:28
much easier honestly there is nothing fundamentally new here it's important to
20:30
fundamentally new here it's important to
20:30
fundamentally new here it's important to follow established patterns and don't
20:32
follow established patterns and don't
20:32
follow established patterns and don't forget about the solid principles
20:34
forget about the solid principles
20:34
forget about the solid principles especially the single responsibility
20:37
especially the single responsibility
20:37
especially the single responsibility principle this will help you better
20:40
principle this will help you better
20:40
principle this will help you better monitor the areas in your code that
20:42
monitor the areas in your code that
20:42
monitor the areas in your code that require attention for example let's
20:44
require attention for example let's
20:44
require attention for example let's consider how the coordinator pattern can
20:47
consider how the coordinator pattern can
20:47
consider how the coordinator pattern can help us using the coordinator pattern
20:50
help us using the coordinator pattern
20:50
help us using the coordinator pattern for navigation allows us to clearly
20:53
for navigation allows us to clearly
20:53
for navigation allows us to clearly track the user path through the screens
20:56
track the user path through the screens
20:56
track the user path through the screens and their current state each each
20:58
and their current state each each
20:58
and their current state each each coordinator calls another and those you
21:01
coordinator calls another and those you
21:01
coordinator calls another and those you can easily compile all the information
21:03
can easily compile all the information
21:04
can easily compile all the information about the user's journey into an
21:06
about the user's journey into an
21:06
about the user's journey into an optimized string such as registration
21:08
optimized string such as registration
21:08
optimized string such as registration inter code main screen more screen
21:11
inter code main screen more screen
21:11
inter code main screen more screen settings or you can even reduce it into
21:14
settings or you can even reduce it into
21:14
settings or you can even reduce it into something like this where each
21:16
something like this where each
21:16
something like this where each designation represents a specific screen
21:19
designation represents a specific screen
21:19
designation represents a specific screen or transition this data can be easily
21:22
or transition this data can be easily
21:22
or transition this data can be easily decoded for
21:24
decoded for
21:24
decoded for analysis you can also use the
21:26
analysis you can also use the
21:26
analysis you can also use the coordinator pattern to determine the
21:28
coordinator pattern to determine the
21:28
coordinator pattern to determine the last screen the user was on before
21:31
last screen the user was on before
21:31
last screen the user was on before closing the app you can send such a
21:34
closing the app you can send such a
21:34
closing the app you can send such a metric based on the hypothesis that if
21:36
metric based on the hypothesis that if
21:36
metric based on the hypothesis that if many user go the app while on a specific
21:39
many user go the app while on a specific
21:39
many user go the app while on a specific screen there is likely something wrong
21:42
screen there is likely something wrong
21:42
screen there is likely something wrong with this screen or users are unable to
21:45
with this screen or users are unable to
21:45
with this screen or users are unable to exit the screen prompting them to
21:47
exit the screen prompting them to
21:47
exit the screen prompting them to restart the app to achieve this you
21:50
restart the app to achieve this you
21:50
restart the app to achieve this you simply need to identify the active
21:52
simply need to identify the active
21:52
simply need to identify the active cordinator in the application will
21:54
cordinator in the application will
21:54
cordinator in the application will terminate method of the appdelegate ask
21:57
terminate method of the appdelegate ask
21:57
terminate method of the appdelegate ask it for the current screen log this
21:59
it for the current screen log this
21:59
it for the current screen log this information and send it to analytics on
22:02
information and send it to analytics on
22:02
information and send it to analytics on the next app lounge with the coordinator
22:05
the next app lounge with the coordinator
22:05
the next app lounge with the coordinator pattern this can be done quite easily
22:08
pattern this can be done quite easily
22:08
pattern this can be done quite easily while keeping your code clean we can
22:10
while keeping your code clean we can
22:10
while keeping your code clean we can also build an upstart time metric based
22:13
also build an upstart time metric based
22:13
also build an upstart time metric based on how quickly the user gains access to
22:16
on how quickly the user gains access to
22:16
on how quickly the user gains access to the app after launching it again using
22:19
the app after launching it again using
22:19
the app after launching it again using coordinator you can measure the time
22:22
coordinator you can measure the time
22:22
coordinator you can measure the time difference from App start app to when
22:25
difference from App start app to when
22:25
difference from App start app to when the app reaches a specific State
22:27
the app reaches a specific State
22:27
the app reaches a specific State according to your business la project or
22:29
according to your business la project or
22:30
according to your business la project or you can monitor how quickly users
22:32
you can monitor how quickly users
22:32
you can monitor how quickly users complete important flows in your
22:34
complete important flows in your
22:34
complete important flows in your application such as payments if users
22:37
application such as payments if users
22:37
application such as payments if users suddenly start taking significantly
22:39
suddenly start taking significantly
22:39
suddenly start taking significantly longer to complete a payment flow you
22:42
longer to complete a payment flow you
22:42
longer to complete a payment flow you will notice it right
22:44
will notice it right
22:44
will notice it right away Additionally you can work with the
22:47
away Additionally you can work with the
22:47
away Additionally you can work with the API layer by recording which requests
22:50
API layer by recording which requests
22:50
API layer by recording which requests were made during up startup or during
22:52
were made during up startup or during
22:52
were made during up startup or during its
22:53
its
22:54
its operation this data can be useful for
22:56
operation this data can be useful for
22:56
operation this data can be useful for understanding the sequence of user
22:58
understanding the sequence of user
22:58
understanding the sequence of user actions and identify potential issues as
23:01
actions and identify potential issues as
23:01
actions and identify potential issues as well as sporting bottom legs during up
23:04
well as sporting bottom legs during up
23:04
well as sporting bottom legs during up up this will be easily to implement if
23:07
up this will be easily to implement if
23:07
up this will be easily to implement if you clearly defined your API and network
23:11
you clearly defined your API and network
23:11
you clearly defined your API and network entities another interesting and useful
23:13
entities another interesting and useful
23:13
entities another interesting and useful magic I recommand is annoy tab this
23:16
magic I recommand is annoy tab this
23:16
magic I recommand is annoy tab this magic tracks situations where the user
23:19
magic tracks situations where the user
23:19
magic tracks situations where the user repeatedly Taps on the same UI element
23:22
repeatedly Taps on the same UI element
23:22
repeatedly Taps on the same UI element which may indicate frustration due to
23:24
which may indicate frustration due to
23:24
which may indicate frustration due to something not working
23:26
something not working
23:26
something not working properly such a metric will be easy to
23:28
properly such a metric will be easy to
23:28
properly such a metric will be easy to implement if you have a clearly defined
23:31
implement if you have a clearly defined
23:31
implement if you have a clearly defined entity that handles the business logic
23:34
entity that handles the business logic
23:34
entity that handles the business logic of the screen such as interactor
23:36
of the screen such as interactor
23:36
of the screen such as interactor controller of VI
23:39
controller of VI
23:39
controller of VI model that's it for today thank you for
23:42
model that's it for today thank you for
23:42
model that's it for today thank you for your attention and interest in the topic
23:44
your attention and interest in the topic
23:44
your attention and interest in the topic I hope you get a better understanding of
23:46
I hope you get a better understanding of
23:46
I hope you get a better understanding of how to start Implement observability in
23:49
how to start Implement observability in
23:49
how to start Implement observability in your iOS own
23:51
your iOS own
23:51
your iOS own project best of luck with your future
23:53
project best of luck with your future
23:53
project best of luck with your future developments and thank you once again
23:56
developments and thank you once again
23:56
developments and thank you once again for being here today