Full Text

Research Article

Micro frontend Client Application Observability and Operational Telemetry Approaches and Patterns


Abstract

Micro-frontends extend the concept of micro-services to the world of UI. The idea behind building applications as Micro Frontend is to develop the experience as a composition of features which are owned and developed completely isolated and by independent teams. These micro-experiences are then strung together either at run-time or build-time to deliver a single cohesive application experience to the end user.

 

In IT and cloud computing, observability is the ability to measure a system’s current state based on the data it generates, such as logs, metrics and traces. Specific to UI applications, this refers to gaining a full understanding of how the application operates in real-time when a consumer interacts with it.

 

Telemetry is often used to refer to the process of collecting and transmitting data from systems, such as logs, metrics and traces. Telemetry data can be used to understand how a system performs and behaves. So, while Telemetry is the collection of data from systems, observability is the process of analyzing that data to understand how a system works. Operational Telemetry refers to the specific data collection that is required by application support and engineering teams looking to debug and triage or ascertain application performance in a development or production environment.

 

Traditional application development has some well-defined options to solution observability and operational telemetry. This paper will dive into a high-level understanding of the options for telemetry, observability and specific intricacies of building a holistic observability solution for micro-frontends.

 

Keywords: Telemetry, Observability, Web development, Micro-frontend, Composable Architecture

1. Introduction

Observability is how different stakeholders of a software understand its health. In control theory, observability is defined specifically geared towards engineers, referring to how engineers can infer the internal states of a system from knowledge of that system's external outputs. Overall, this provides a proactive approach to analyse and optimize their system based on the data it generates. Most modern systems are complex and are developed and deployed at significant scale. Often these systems are distributed deployments and an observability platform is crucial to keep operations manageable.

Observability platforms provide a real-time view of the health of a system, most often from an operational perspective. These platforms traditionally provide an overall solution suite with ability to collect, store, analyse and visualize logs, other metrics and if required, traces. These help engineers and other stakeholders dive into applications and infrastructure to understand system behaviour either to resolve issues or for better understanding the system for optimization.


There are often different stakeholders for an application who want data collected about application operations, activity and performance. These stakeholders often have their specific concerns and differing requirements based on those concerns. At a macro level, these concerns may be divided as coming from the product, business, production operations and development teams. The operational teams may have different concerns depending on their scope being a tier 2 or early triage operations compared to the actual devOps or Tier3 teams representing the application.

 


For this document, we will stick to operational observability
(figure1) and focus specifically on micro-frontend web applications. These concerns are well documented for traditional applications and on the backend systems. Web application telemetry is an often-overlooked topic. Micro-frontends do bring some specific concerns into the mix which this paper will try to bubble up.

 

2. Considerations for effective Observability Strategy

Observability needs vary based on type of application and its targeted domain, uptime and availability needs, criticality etc. There is also significant variance based on the team requesting the observability solution. This section will go over these concerns before we dive into observability solutions.

 

2.1. Complexity of UI Application: Client web apps have traditionally had limited operational telemetry built into it with most relying heavily on their backend server telemetry for operations. Traditional multi page apps utilize constant chatter with their server across the page which provides ample coverage even if the application traffic is just monitored at the client-server interfaces. With modern development methodologies including strategies like single page applications and apps integrating and using with native OS capabilities via local API(s), monitoring on the server is not always enough. Additionally, the increase in client compute and advent of complex frameworks like angular is increasing complexity of client apps.

 

How does micro-frontend strategy impact this complexity? Depending on how your micro-frontend is strung together, it is often more complex than a regular app. There is more complexity client side which can break the application, generally driven by conflicts between different microapps stemming from JavaScript, styles and other dependencies and from the heightened resource utilization.

 

Additionally, depending on implementation, a lot of enterprise observability platforms don’t work out of box. As an example, for an application implemented with multiple angular elements running side by side, a leading APM solutions’ client monitoring suite kept identifying every angular elements load and unload as individual apps creating significant noise and diminishing all out of box capabilities.

 

2.2. Type of application

While all applications are important, certain applications have more critical availability and resiliency needs than others driving up the need for a monitoring solution. As an example, a banking solution may desire higher uptime and availability than a publishing website. The nature of the application may drive the observability needs.

 

2.3. Application Access and User-agents

Like complexity in the application codebase, the ways an application is accessed may also drive complexity. An application only accessed on specific desktop browsers is far less likely to have client-side issues than application that is accessed over desktop, mobile and web-views etc. These different clients that need to be supported drive up the complexity and chances of encountering some failure permutation. WebView’s are especially tricky as unlike let’s say a desktop chrome, which comes with a whole set of debugging tools, capabilities when supporting triage for an app within a web-view are significantly more limited, especially in production settings. Micro-frontends often increase this complexity as they increase the number of modules and codebases that come together and may fail.

 

2.4. Operational Support Team requirements

Different kinds of teams may drive different requirements, operation teams are often broken down into different Tiers. Listed below are the different tiers and the kind of requirements they drive

 

2.5. Levels of Monitoring

Even for web-apps, Monitoring can be at multiple levels

3. Website monitoring

As discussed in the previous section, website monitoring focuses on accessibility and performance of a web application from the users of the application perspective. This traditionally involves synthetic monitoring strategies where we have scripted access to the application executed from distributed geographic locations. Advanced synthetic testing mimics user behavior as they engage with the application to determine how it’s working.

 

3.1. Advantages of Synthetic monitoring

There are some key advantages to maintaining synthetic monitors



3.2. Types of Synthetic monitoring concerns

Synthetic monitoring can be created to monitor for specific concerns. The commonly monitored concerns include

 

3.3. Granularity of Synthetic monitoring for web-apps

There may be two levels of granularity for synthetic

 

3.4. Synthetic monitoring challenges

Synthetic monitoring strategy comes with some common challenges which are listed below.

Micro-frontends complicate this strategy in a few ways. Modern micro-frontend applications are more complex and often distributed. Testing across an entire micro-frontend application can requires testing individual micro-frontends for concerns like availability, performance and transaction uptime. This may complicate the scripting significantly or require additional scripts. If multiple micro-frontend teams are involved, as is often the case, there is the added complexity and overhead of managing script creation and co-ordination across these teams.

 

4. Application-level monitoring

This type of monitoring also often referred to as ‘End-user-Monitoring’ or ‘Real-user-Monitoring’ looks at the inner workings of the web application. This type of monitoring looks at capturing logs and health signals while actual end-users access the application. As such, while it lacks the proactive nature of synthetic apps, it allows us to quantify user interactions and critical performance data. This also helps us capture and analyse site metrics like access by user types, devices etc.

 

4.1. Advantages of Application-level monitoring

There are some key advantages to maintaining an application monitoring strategy


4.2. Application-level monitoring data-points

Application monitoring often uses multiple avenues to capture data.

 

4.3. Application-level monitoring approaches

The above data can be captured using a combination of a few approaches. There is always the option of buying a third-party solution to avoid having to build and maintain a solution.

 

 

4.4. Application-level monitoring challenges

While there are advantages to this type of monitoring, it does come with its set of limitations.

 

5. Server (OS) level monitoring

This level of monitoring captures data from the underlying user-agent or device running the web application. Capturing this level of data is not always in the hands of the application teams, but this strategy is often executed alongside synthetic monitoring strategies.

 

Data points like memory usage, which are a significant concern for micro-frontends, are often measurable using this strategy. Some modern browsers, like chrome, allow memory to be captured via the performance object, a capability that is not widely supported.

 

6. Conclusion

Observability and telemetry in UI apps come with its own set of challenges. micro-frontend applications add to this challenge by presenting unique specificities beyond traditional UI monitoring. By understanding these specificities and operational requirements and leveraging a combination of synthetics and application monitoring side by side organizations can still achieve comprehensive observability for micro-fronted UI Tiers.

 

References

  1. https://sematext.com/guides/what-is-real-user-monitoring/-rum-limitations
  2. https://www.datadoghq.com/product/real-user-monitoring/
  3. https://www.ibm.com/topics/synthetic-monitoring#:~:text=Synthetic%20monitoring%2C%20or%20synthetic%20testing,and%20impacting%20the%20user%20experience.
  4. https://www.solarwinds.com/solarwinds-observability/use-cases/web-app-monitoring
  5. https://medium.com/@NeotericEU/single-page-application-vs-multiple-page-application-2591588efe58
  6. https://www.buchanan.com/what-is-the-difference-between-it-support-tiers/#:~:text=Your%20Tier%202%20team%20should,the%20product%20engineers%20or%20developers
  7. https://www.netsuite.com/portal/resource/articles/erp/operational-analytics.shtml
  8. https://onlinedegrees.scu.edu/media/blog/data-analytics-driving-better-business-decisions#:~:text=The%20four%20subsets%20of%20data,at%20all%20levels%20of%20operations
  9. https://newrelic.com/blog/best-practices/what-is-observability
  10. https://en.wikipedia.org/wiki/Real_user_monitoring
  11. https://www.swyx.io/frontend-observability