Proactively Detect Application Issues By Using Synthetic Monitoring in OCI APM Service

Once in production, applications must be available and functional at all times. However, problems do occur and require immediate remediation. Continuously monitoring an application's status ensures the quality of service provided by the application. Synthetic monitoring in Oracle Cloud Infrastructure's (OCI) Application Performance Monitoring (APM) service proactively detects availability and performance issues before they can impact the business or user experience. It simulates critical transaction flows that users might experience in your application by executing prescribed monitors from a set of pre-configured locations around the globe and secure locations privately set in your tenancy.

Architecture

This reference architecture illustrates how to set up a Dedicated Vantage Point in your tenancy and securely monitor the applications by using synthetic monitoring in the APM service. Use Dedicated Vantage Points for applications running behind a firewall, inside your corporate network environment and inaccessible to public synthetic vantage points.

Deploying a Dedicated Vantage Point automatically deploy a Kubernetes cluster inside your compartment. This connects to the VCN where your applications are running. The deployment includes a Deployment Manager, which orchestrates the deployments of individual monitors in your Dedicated Vantage Point.

When a monitor is created and scheduled to run on your Dedicated Vantage Point, a Docker image is created that runs your Monitor at scheduled intervals. Once a Monitor is executed, the Dedicated Vantage Point will communicate with your APM domain, and provide metrics, browser logs, network trace data, screenshots, and HAR files.


Description of synth-monitor-apm-arch.png follows
Description of the illustration synth-monitor-apm-arch.png

synth-monitor-apm-arch-oracle.zip

The architecture has the following components:
  • Region

    An Oracle Cloud Infrastructure region is a localized geographic area that contains one or more data centers, called availability domains. Regions are independent of other regions, and vast distances can separate them (across countries or even continents).

  • Tenancy

    A tenancy is a secure and isolated partition that Oracle sets up within Oracle Cloud when you sign up for OCI. You can create, organize, and administer your resources in Oracle Cloud within your tenancy. A tenancy is synonymous with a company or organization. Usually, a company will have a single tenancy and reflect its organizational structure within that tenancy. A single tenancy is usually associated with a single subscription, and a single subscription usually only has one tenancy.

  • Compartment

    Compartments are cross-region logical partitions within an OCI tenancy. Use compartments to organize your resources in Oracle Cloud, control access to the resources, and set usage quotas. To control access to the resources in a given compartment, you define policies that specify who can access the resources and what actions they can perform.

  • Virtual cloud network (VCN) and subnets

    A VCN is a customizable, software-defined network that you set up in an OCI region. Like traditional data center networks, VCNs give you complete control over your network environment. A VCN can have multiple non-overlapping CIDR blocks that you can change after you create the VCN. You can segment a VCN into subnets, which can be scoped to a region or an availability domain. Each subnet consists of a contiguous range of addresses that don't overlap with the other subnets in the VCN. You can change the size of a subnet after creation. A subnet can be public or private.

  • Deployment Manager

    The Deployment Manager allows you to use a declarative configuration to create, describe, update and delete Kubernetes resources. This configuration is a YAML file that configures Kubernetes resources or supplies parameters to YAML file templates, which contain Jinja mark up or Python scripts.

  • Container Engine for Kubernetes

    Oracle Cloud Infrastructure Container Engine for Kubernetes is a fully managed, scalable, and highly available service that you can use to deploy your containerized applications to the cloud. You specify the compute resources that your applications require, and Container Engine for Kubernetes provisions them on OCI in an existing tenancy. Container Engine for Kubernetes uses Kubernetes to automate the deployment, scaling, and management of containerized applications across clusters of hosts.

  • Synthetic Agent

    A synthetic aAgent, is an Oracle proprietary component that handles the instrumentation of the Browser and Script engine to execute the desired commands and collects required observability data and transmits it to the APM collectors.

  • Application Performance Monitoring

    Oracle Application Performance Monitoring is a Platform as a Service (PaaS) based solution that provides deep visibility into the performance of your application, from end user to application logs. The service integrates user experience information, application metrics, and log data analytics.

    • APM domain

      APM domain is an OCI resource type, which contains the systems being monitored by Application Performance Monitoring.

      Each APM domain is created in a standard OCI compartment, and you can define OCI access control policies to grant access to the APM domain to a specific set of users.

    • Synthetic Monitoring

      Synthetic Monitoring enables proactive monitoring, which helps developers and operators prevent issues before users are impacted. It provides the ability to run scheduled monitors to ensure application availability.

      By using Synthetic Monitoring, you can create four types of monitors: Browser, Scripted Browser, REST, and Scripted REST. You can run these from various geographical locations called Vantage Points.

    • Vantage Points
      Vantage Points are locations from which you can define and run synthetic monitors. There are two types of Vantage Points:
      • Public Vantage Points

        A diverse set of pre-configured locations around the globe from where you can run monitors.

      • Dedicated Vantage Points

        Locations that you can set up in your tenancy to ensure that you can securely run your monitors.

    • APM Tracers

      APM Tracers record OpenTracing spans with application metrics and send spans and metrics to the application

.

Recommendations

Use the following recommendations as a starting point when implementing synthetic monitoring. Your requirements might differ from the architecture described here.
  • Before starting the wizard, gather important information such as VCN details, the authentication token, the APM domain OCID, and the private key of your APM domain.
  • Verify if the VCN on which you want to run the Dedicated Vantage Point allows direct communication to the APM domain data endpoints. If it does not, you will also need to enter the proxy information to complete the communication.
  • When setting up a dedicated vantage point, enable the auto-upgrade the DVP artifacts option. This option ensures that the Dedicated Vantage Point is updated to the latest version of the synthetic components and stays sychronized with the same synthetic agent versions used on public vantage points. This option is described, with screenshots, in the blog, "How to use your own dedicated vantage points with synthetic monitoring", which you can access from the Explore More topic, below.

Considerations

When implementing synthetic monitoring in OCI APM Service, consider the following:

  • You can deploy an APM tracer or an APM agent to the application to collect traces and spans. Inf issues arise, you can drill down from the failed or slow monitor runs to open an in-context view in the Trace Explorer. Here, you can review any observations collected during monitor execution.
  • You might want to run tests against integrators' endpoints. If your application calls into a third-party or internal web service, you should test those endpoints regularly to ensure that your application remains functional across the board.

Deploy

To deploy Dedicated Vantage Points, see this end-to-end demo captured in the Oracle Cloud APM tutorial, "DEMO: Synthetic Monitoring", which you can access from the Explore More topic, below.

Explore More

To learn more about Oracle Application Performance Monitoring and synthetic monitoring, review these additional resources:

Acknowledgments

  • Authors: Yutaka Takatsu
  • Contributors: Rahul Chandok, Avi Huber, Jurgen Leije, Trisha Pan