Skip to main content

Python Application Performance Monitoring

Monitor and optimize the performance of your Python application with the Site24x7 APM Insight Python agent. The agent provides you with information on the response time, throughput, database operations, and errors of your application. Keep track of these metrics over time to identify where to optimize them for enhanced performance.

Make sure you have a Site24x7 account before you use an APM Insight agent to monitor metrics.

Requirements: Python version 3.5.0 and above

Supported frameworks: Django and Flask

Supposed databases and components: PyMySQL, Psycopg2, Pymemcache, Redis, SQLite, Jinja2, and Cassandra

Installation instructions:

  • Install the agent in your application directory using the pip command.

      pip install apminsight
    

Note : The agent provides support for the applications that use the Web Server Gateway Interface in their services.

  • For Django applications, add apminsight.contrib.django as the first of INSTALLED_APPS in the Django settings.py file

  • For Flask applications, add import apminsight in the first line of the main file

  • You can configure the agent details using either environment variables or a configuration file.

  • If you configure the agent details using environment variables,

    Add the license key as S247_LICENSE_KEY to the environment using the following command

      export S247_LICENSE_KEY=<license-key>
    

Note: You can obtain your license key by logging in to your Site24x7 account and navigating to Admin> Developer > Device Key. The device key is your license key.

  • Apart from the license key, you can also add other environment variables like your application name and port number.

      export APM_APP_NAME = <Your application name> 
      export APM_APP_PORT = <Your application port number>
    

    If you are using proxy:

      export PROXY_SERVER_HOST=<Proxy Server host number>
      export PROXY_SERVER_PORT=<Proxy Server port number>
      export PROXY_AUTH_USERNAME=<Username for proxy authentication>
      export PROXY_AUTH_PASSWORD=<Password for proxy authentication>
    
  • If you configure the agent details using a configuration file:

  • Create a file named apminsight_info.json in the root folder where the application is running.

  • Insert the following code snippet into the file, making the necessary changes:

      {
      "license_key" : "<Your Device Key>",
      "app_port" : "<Your application port number>",
      "appname" : "<Your application name>",
    

    If you are using proxy:

      "proxy_server_host" : "<Proxy host number>",
      "proxy_server_port" : "<Proxy port number>",
      "proxy_auth_username" : "<Username for proxy authentication>",
      "proxy_auth_password" :"<Password for proxy authentication>",
      }
    
  • Restart your Django or Flask application

  • Perform some transactions in your application for the agent to collect data. Log into your Site24x7 account and navigate to APM Insight and click on your application to see application metrics.

  • You can view agent log files in the apminsightdata directory, which will be present under the process created location.

Metadata

Release files for apminsight 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apminsight 1.0.3
File Size Uploaded
apminsight-1.0.3.tar.gz 25.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apminsight 1.0.3
File Interpreter ABI Platform
apminsight-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 67.0 kB

Release files / apminsight-1.0.3.tar.gz

Download URL apminsight-1.0.3.tar.gz
Size 25.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3c9d6d734b76be60577417f963c962cd75bfdf01df3942eca4fe9bf22ad631ee
BLAKE2b-256 checksum
How to use checksums
0f69a2db9cbd99189c49a8ed413e178e15e868fa3399b185491544ab4b974e92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.10

Release files / apminsight-1.0.3-py3-none-any.whl

Download URL apminsight-1.0.3-py3-none-any.whl
Size 41.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d11d6f9acc6d2f696bff3a82949e96c5a4550122e52e39aaa2f64d73447fb9a
BLAKE2b-256 checksum
How to use checksums
f78dd23aaff29ce1c45aa269af63e57dd87db38f3e11d28f0550ac7b242bf0ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.8.10

Release history Release notifications | RSS feed

1.8.4

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.4

2 release files

1.7.3

2 release files

1.7.0

2 release files

1.6.2

3 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page