PasteDeploy

You can instrument a Python application built with PasteDeploy by modifying your PasteDeploy configuration to use a composite factory supplied by AppDynamics. This feature can be used to instrument applications described by the other deployment options if they were built with PasteDeploy.

The AppDynamics composite factory is named egg:appdynamics#instrument. It requires a parameter named target that points to the application to the original application and the full path to the APPD_settings.

To instrument an application built with PasteDeploy:

  1. Manually launch the AppDynamics proxy:
    pyagent proxy start
  2. In the PasteDeploy configuration file, rename the existing composite to a unique name.
    For example, if the existing composite configuration for an application named metadata is:
    [composite:metadata]
    use = egg:Paste#urlmap
    /: meta

    You could rename it:

    [composite:_orig_metadata]
    use = egg:Paste#urlmap
    /: meta
  3. Create a new composite section for the metadata application above the original one that you just renamed, as follows:
    1. Give the name of the old renamed application to the new composite application.
    2. Configure it to use the AppDynamics composite factory: egg:appdynamics#instrument.
    3. Set its target to the renamed application.
    4. Set the AppDynamics configuration file environment variable, APPD_CONFIG_FILE, to the path of your configuration file. For example:
      [composite:metadata]
      use = egg:appdynamics#instrument
      target = orig_metadata
      APPD_CONFIG_FILE = /etc/appdynamics.cfg
  4. Restart the application.