welcome to oracle apm tutorial series application performance monitoring or apm is a service in
oracle cloud infrastructure that provides a set of solutions including distributed
tracing real user monitoring and synthetic monitoring this recording covers synthetic
monitoring which is a part 5 of the tutorial my name is yutaka takatsu i am one of the product
managers in observability and management product management team in oracle cloud infrastructure
the tutorial consists of five different video recordings which you can find in this oracle
channel each recording is about 20 to 30 minutes long please find the video links to other chapters
from the description in this video this is a recording of part 5 synthetic monitoring
this is chapter 11 synthetic monitoring i will first go over the solution overview
then show you how to set up monitors then talk about how you can use the synthetic data
you can use apm synthetic monitoring to proactively monitor the availability status
and performance of your web applications and api endpoints it provides a workflow that enables
you to define monitors either browser or rest api based or scripted monitors to perform tests
against your applications these monitors are oracle cloud resources that can be scheduled to
run from one or more geographical locations around the world these locations are called vantage
points which are available publicly in oracle cloud data centers where apm service is available
you can also create your own vantage point in your oci tenancy to ensure the secure execution
of your synthetic monitor monitors collect metric data that includes information whether the monitor
round was succeeded or failed how long it took to complete and also how fast resources were loaded
during the execution of the monitor and you can see this information in dashboards it provides
predictable results and validates the ability of your applications you can also select to collect
the screenshots of what the browser loaded during the monitor run or capture network trace details
for additional troubleshooting information if your application is instrumented with an apm tracer
you can drill down from the synthetic monitor run to punch out to the trace explorer page
and trace each request from the browser throughout the entire application stack next i will show you
how to create a browser monitor a monitor can be created in a synthetic monitoring page in
oracle cloud console this is also the page where you can see the status of the existing monitors
in this example there are five monitors configured in this apm domain you can see the status interval
and number of vantage points for each monitor in apm there are four types of synthetic monitors you
can create such as browser monitor which requests a single url through an automated browser session
and scripted browser monitor which also brings up a browser session but executes a selenium test
script having a sequence of recorded user requests there is also a rest monitor which executes a
single rest call to a defined endpoint and a scripted rest monitor that executes a sequence
of instructions against the defined rest endpoint that are stored in the postman monitor script
next let's create a monitor click the create monitor button and this will bring you to a wizard
first name your monitor and select the monitor type in this example
i will create a browser monitor next type in a url that you want to test against with this monitor
make sure you type in the entire url including http you can also specify a text in the verify
response content field which you can use to make sure the right page is loaded
click next to move on to the next page the first option in this section is to select vantage
points which you want to run your monitor you can select multiple locations from the pulldown menu
if you already configure the dedicated vantage point that runs in your own tenancy that will show
up in the list too then configure how frequent you want to run the monitor by specifying the
interval between the monitor runs you can also select to enable the network collection option
this option executes the trace route against the base url of the monitor and provides a report of
all hops that the request went through in case your endpoint cannot be reached
this option provides valuable information to troubleshoot the network issues now we are all
set with the required configurations click next and complete the setup of the monitor
now you have a monitor running you can start analysis with the monitors dashboard the bar
chart at the upper left side of the screen shows the number of runs and whether they have succeeded
or failed and the one next to it shows the vantage points where the monitors were run if you see
the monitor is fading at all locations you might have a connection issue towards your application
a graph in the upper right side displays execution time of the monitor if you see spikes that
indicate some part of your application is not performing well and to see more details there
are breakdown charts load time breakdown chart is closely related to the execution time in this
example you can see a spike with blue color which is indicating the ajax calls are slowing down
in case of network issues the connection time breakdown graph can help you to analyze the
root cause the failures in the monitoring runs can be caused by the ssl not being resolved
or an issue in dns also a longer execution time may be caused by the delay in the connection
and looking at the list of monitors the second monitor seems to be the slowest
also having a failure so let's take a closer look at this monitor by clicking in the monitor name
in the history section of this monitor page you can see all executions of this monitor you
can also filter the executions such as the time range or by the status or by the vantage point
in the list there is a monitor run that was taking a lot more time than others to complete
to diagnose what was going on with this monitor run click the three dot icon at the end of the row
this opens a menu that provides you options to analyze the monitor execution
so for example you can see error message coming from selenium script
in case of a failed script run or trace details in case of network issue you can also see a set
of screenshots of the html pages navigated in monitor or download browser console logs
here let's review the har files i may have information regarding why the pages were slow
har file or http archive file stores information regarding user actions performed on the browser
and it is commonly used to troubleshoot web pages apm also adopted to collect har files
at the monitor executions and visualize it in this page on the top left side of the screen
there is a pie chart showing almost 70 percent of the total execution time was spent on waiting
so let's scroll down to see if there's any more information and here it is so it turns out that
the page was waiting for 25 seconds on a single request which is a post to checkout service
this is where the slowness was happening so let's click the link and review the request and response
header information you may see something unusual in the headers that might be causing the issue
and there is also a camera icon at the end of the row which opens a
screenshot captured at the time of the monitor run
and this is where you see the error pages such as an internal server header in case of the failed
monitor runs in this particular monitor run the screenshot shows the page was loaded successfully
but the page was still waiting for a long time for the checkout in case of the slowness you may
need to drill down to the server side to find the root cause so let's close this window and go back
many times reviewing har files and other mentioned options
help you troubleshoot your performance issue in web applications however in case the root
cause is at the back end it requires investigation in the application server
so if you have configured apm tracer on the application you can use the view trace
detail option to navigate to trace explorer page directly from the monitor history page
and here open the trace explorer because we navigated from the monitor history run page
the query was automatically created to display the result of this particular
monitor run looking at the gantt chart in the main section there is a trace at the top row
where it took 25 seconds to complete this should be the request of the slow monitor
run which we were seeing at the monitor page click the operation name to see the details
and from here it's straightforward to spot the issue one of the spans was taking 22 seconds
from the operation name you can tell it is a jdbc span and it seems to be a database update
which was done as a part of the car to update in a checkout service so this seems to be the
root cause of the slowness but you can also see the database related to dimensions from the span
click the open span details page where you can see the diagnostic details of the span which includes
database connection string or sql id that you may want to use to further diagnose the database
moving on to the chapter 12 synthetic dedicated vantage points
in the previous chapter we talked about the synthetic monitors which can be run
from vantage points which are provided in the oracle data centers around the world in addition
to those public vantage points you can set up a private vantage point in your secured oracle cloud
location this is called a dedicated vantage point or dvp dedicated vantage point is a useful option
when your application resides in on-premise location or a secure network and cannot be
accessed from the public vantage point or you want to test your internal applications which are not
publicly open to the internet and another use case is to test secured apis for integration purposes
the solution to above use cases is to use the dedicated vantage points
you can set up a dedicated vantage point in your own tenancy by provisioning the template
which automates the deployment by doing this it will create a copy of the same public vantage
point which we have in oracle public cloud but gives you a full control or network setup to
ensure the access to your secured application next let's see the architecture of the setup
in this architecture overview you can see a secured environment with two applications
a microservice application and a legacy application both running in a single
virtual cloud network or vcn in oracle cloud so these are the applications you
want to monitor using apm synthetics but since the apps are running inside the secure network
you cannot use public vantage point to run monitors publicly on the internet
in this case you can deploy a dedicated vantage point in your oracle cloud tenancy
when deploying a dedicated vantage point an oracle container engine for kubernetes
or oke cluster is automatically deployed inside your compartment this connects to the vcn where
your applications are running the deployment includes scheduler and deployment manager
which orchestrate 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 the 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 hard files now let's see how the dedicated vantage point can be created
you can create a dedicated vantage point from the synthetic monitoring page in oracle cloud console
if you're not an oracle cloud administrator as a prerequisite please be aware that you need your
administrator to create a policy which allows you to create a dedicated vantage point and grant that
policy to you or to your user group please see the oracle apm documentation for more details
on how to set up policies and before starting the wizard gather the information such as vcn details
authentication token apm domain ocid and private data key of your apm domain please also check
if the vcn which you want the dedicated vantage point to run allows direct communication to
the apm domain data endpoints if it doesn't you need to set up a proxy to have the communication
to go through so in that case you need to gather the proxy server information as well
once these details are collected you can start the wizard by clicking the link
in the wizard follow the instructions to configure entities such as vcn apm domain oke or proxy along
with other information and once you enter all the required configuration information in the wizard
the resource manager stack details page opens and start provisioning of the dedicated vantage point
this process will take around 45 minutes to 50 minutes to complete
and once the provisioning is completed with successful result your dedicated vantage point
is created to verify open the create monitor page or edit the monitor page as shown in the screen
then open the pull-down menu under vantage points you will see your new dedicated
vantage point which you just created in the list you can use a dedicated vantage point
to run your monitors within your vcn within or connected to your protective environment
this is the end of the recording of part 5 synthetic monitoring in application
performance monitoring service in oracle cloud infrastructure please find the links to other
chapters of the apm tutorial series from the description in this video thank you for watching