Welcome to oracle APM tutorial series. Application Performance Monitoring 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 introduction and setup which is a part one 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 the other chapters from the description in this video. This is a recording of part 1 introduction and setup. let's kick off the tutorial with the introduction of the service.
Application Performance Monitoring or APM in short is a new service in oracle cloud infrastructure it helps you to monitor cloud native and enterprise application either there is a microservices application running on kubernetes or a package application with traditional multi-tier architecture apm tracks every step of every transaction allowing you to envision the complete set of trace data with rich user interface on oracle cloud console you can visualize the data with out-of-the-box dashboards that are predefined for common use cases or create your own custom dashboard that meets your specific requirements captured data is stored in the internal database for real-time and historical data analysis using built-in sql-like query language you can flexibly retrieve the data and come up with the desired result set to diagnose issues in your application you can run additional breakdown by filtering the data with predefined and custom dimensions to narrow down the data selections which allows you to run deep dive analysis to identify the root cause of the issues all these result in reduced downtime enhance the visibility into the performance in your distributed systems with better user experience and satisfaction apm delivers 4 and plus distinct capabilities distribute tracing which captures full traces from applications allowing you to run deep dive analysis and diagnostics real user monitoring that measures end user performance and satisfactions synthetic monitoring which proactively runs predefined transactions from global locations to measure the user experience of your critical application flows and server monitoring which collects metrics from its own java based data sources also from other technologies using Prometheus scraper capability additionally apm is integrated with other oracle services that allows you to extend analysis in other services in oracle cloud such as stack monitoring logging analytics and database management services we will discuss more about each apm capability in this tutorial let's go over the architecture of apm service at the left side of the screen you see the logos of cloud vendors say this is where your application resides your application may be running in oracle cloud or your traditional on-premise data centers or in other cloud platforms such as aws or microsoft azure to capture the application data you need to instrument a tracer or a data source apm supports open tracing and open telemetry standards so you can use the data sources that apm provides for instrumentation or you can use other tracers such as jager or zipkin whatever the tracer you use every event you have in your application will become a span a group of spans is called a trace which represents a transaction in your application server metrics are captured through the data source as well the traces spans and metrics are then sent to apm server over https at the lower side of the screen there is a browser which you can use apm browser agent to capture spans and there are vantage points which are the data collection locations for synthetic monitors the vantage points are available out of the box in any commercial data centers in oracle cloud where apm service is available once the data flows into the apm server it is stored in autonomous database in oracle cloud which is a storage dedicated to apm customers data can be extracted on demand and displayed on the apm dashboards or trace explorer user interface for real-time and historical analysis data is also sent to the monitoring service where you can sit on alarm or configure to send email notifications now let's quickly review the apm service from the oracle cloud console web interface what i have on the screen is the oracle cloud login page select your tenancy and click next enter your username and password and sign in oracle cloud get started page opens click the navigation menu from the top left corner then select observability and management here you see menus under application performance these are the pages where you can use apm to monitor your applications diagnose problems and manage and configure apm setup let's click home which opens the home page of the apm service you can see the overview information of performance and the status of the monitored applications in particular apm domain from the top menu you can access other apm features such as dashboards apn provides predefined dashboards that cover specific areas in your interest such as real user monitoring synthetic monitors or app servers and the home page you just saw in fact is one of the predefined dashboards too in addition to them you can create your own custom dashboards that are tailored to your specific use cases let's see one of the predefined dashboards here open the real user monitoring dashboard having information related to users such as the location of the user or Apdex which indicates how happy the users are also what devices they use and page load information from users perspectives another apm feature that you can visualize the data is trace explorer in trace explorer you can monitor traces and spans collected by different data sources and visualize it in the various display options by default traces are presented in the gantt chart as you can see in the screen in addition you can see the data in the topology view to envision how the spans and services are connected in a single trace trace explorer provides sql-like query language which allows you to flexibly create a view of a specific set of traces there are also a set of predefined queries you can start with for common use cases once you get the result many times you want to see more details you can further filter down the results using out-of-the-box or custom metrics and dimensions and view details of the individual spans and their attributes to analyze the customer behaviors find the performance bottlenecks or troubleshoot program errors now let's see synthetic monitoring here you can see a list of synthetic monitors currently running in the apm domain there are different types of monitors such as browser scripted browser scripted rest or rest clicking the enable monitor opens a monitor home page where you can see the general information of the monitor the type of the monitor name of the script in which vantage points it runs and how frequently it is executed by selecting history from the resource menu you can see the execution history of the monitor such as when it was running in which location and how long it took so that was a synthetic monitoring next i would like to show you is the administration page this is where you can download java agent installer to your local file systems so that you can upload it to the location where your application is running administration page is also where you can set up apm domain and configure the related features so that was a quick introduction of apm service in oracle cloud we will see more details about these pages later in this tutorial now we'll move over to the chapter two okay so chapter two so in this chapter i will go over the policies and permissions that are required to start using apm then talk about the apm domain and how we can collect the data upload endpoints and data keys which are the parameters you need when deploying data collectors to start working with apm you will need to run a few prerequisites in the oracle cloud console first you need a compartment where you create an apm domain compartment is a feature in oracle cloud that helps you organize and isolate your cloud resources it is a tenancy-wide logical namespace where you can enforce policies and create cloud resources just like folders in the file system you can either use your existing compartment or create a new compartment that is designated for apm use next you'll need users who can log on to oracle cloud console and use apm services such as managing apm domain monitoring apm metrics or creating alarms the apm users can also belong to a group that is permitted to use apm services then you will need to create policies which determine who can do what on which resources in this case the policies will be created for the apm users and groups to manage the oracle cloud resource in a specific compartment for example you can allow users in a group apm grp to grant read permissions to all the apm domains in a specific compartment there are four types of apm policies that are showing in a table in the screen first two policies are essential to use apm service apm policies control access to view or manage tasks in apm domains and monitoring policies grant permissions to access apm metrics and set up alarm and notifications the latter two policies in a table are optional as they are designed to control the permissions for specific features in apm such as to create custom dashboard or create a vantage point in case you're not an OCI administrator let me show you a sample flow to set up apm as an example in this simple file diagram you have a headed on based microservice application that runs on kubernetes you want to use apm to monitor the microservices there are a few options to do this but you have decided to use apm tracer as a data source what you will do first is to obtain data upload endpoint and data keys from the apm domain then go to the applications project directory add configuration file such as application yaml file and add data upload endpoint and data key which you copied from the apm domain then rebuild and re-deploy the application soon the data source starts sending the traces and spans to the apm domain with the provided data in the point url there are additional capabilities you can also manage in the apm domain page first there is apdex thresholds which is a set of rules that you can manage in the apm domain page optics can be used to measure the levels of user satisfaction there are also spam filters and metric groups they can be used to define a set of custom spans and metrics that are pushed to the monitoring service so that they can create alarm against i will explain these topics with more details in the later chapters in the tutorial moving on to the chapter 3 working with data sources apm provides data sources for different use cases we'll go through the data collectors options and discuss the deployment examples the term data source in apm refers to the programs that gather in monitoring data from the target applications and upload to apm apm has several different types of data sources as displayed on the screen they are the apm browser agent java agent or tracer or synthetic monitors each data source has different use cases deployment steps apm browser agent can be used in the front end of the web application to collect spans and metrics you'll need to manually edit a file in application such as index.