Harness the power of Application Performance Monitoring: Analyze the end-to-end performance of your Python programs

July 27, 2021 | 2 minute read
Daniela Hansell
Director, Observability and Management
Text Size 100%:


Exciting news for all of you Oracle Cloud manageability fans!  With the introduction of Application Performance Monitoring (APM), an Oracle Cloud Infrastructure (OCI) native service, Developers, DevOps and application administrators can now truly monitor the end users experience by tracing multiple components and application logic distributed across various clients, third-party services, and backend tiers,  in the Cloud or on-premises.


How does Distributed Tracing work?

Application Performance Monitoring collects and processes transaction instance data from pre-defined data sources, open-source tracers, or directly using APIs.  The support for OpenTracing, an API and vendor-neutral instrumentation framework,  allows application developers to instrument their application code themselves and analyze the trace data in APM.

Distributed Tracing monitors transaction performance, volume, and error rate and helps pinpoint failures or poor performance.  It analyzes load, usage patterns, performance, and capacity across out-of-the-box and custom dimensions.  This method is particularly well suited for microservices-based applications.

Instrumenting your code

With support for OpenTracing, the possibilities are endless!  In this blog we will show you an example of how you can analyze the end-to-end performance of a Python program using APM's Distributed Tracing capability.  The hope is that this blog will become the first in a series of blogs dedicated to APM OpenTracing support.

To instrument Python programs and collect timing data, we use the open-source distributed trace system, Zipkin.  We integrate Zipkin with our Python programs and in turn Zipkin will trace our Python code and upload this trace data to APM Trace Explorer. 

      At a high level, here’s how the various components integrate:

InstrumentationAt the code level,  here’s how the code is structured:

Code Structure


The configuration steps are simply this:

  1. Import a customized py_zipkin into the Python code (APM only supports the Zipkin format for now)
  2. Create an APM Domain using the APM console and note its details (the upload end point and data keys)
  3. Configure the Zipkin Transport for Python to include the data upload endpoint where trace data will be uploaded
  4. Analyze your data in APM Trace Explorer

When the configuration is complete and your Python program is invoked, Zipkin will automatically send trace data to the selected APM Domain and the traces can be analyzed using the APM Trace Explorer.  In addition,  the OCI APM Console will allow you to see the overall time taken by the Python program.

Take a closer look at how this was done in this step by step tutorial.

The content of this blog was based on examples created by Ye Wang and Shengjun Zhu of Oracle's Solution Engineering Hub. Click here to learn about Oracle Solution Engineering Hub..

To learn a lot more about Application Performance Monitoring visit:

Daniela Hansell

Director, Observability and Management

Daniela has a background in Oracle Observability and Management solutions product management, training, and curriculum development.  She currently manages the observability and management user assistance development team, focusing on optimizing the end user experience with our products and various types of technical content.

Previous Post

Announcing the general availability of the Oracle Enterprise Manager 13.5 App on Oracle Cloud Marketplace

K B Sumesh | 3 min read

Next Post

Webcast: The Power of Enterprise Manager Mobile Application

Timothy Mooney | 2 min read