python-3.xappdynamics

Do AppDynamics python agent supports barebone python scripts w/o wSGI or Gunicorn?


I have an Extract, Transform, Load (ETL) pipeline that I want to monitor with AppDynamics.

The ignition of the ETL is done via a barebone python command without use of a web server. Hence no WSGI / Gunicorn / uvloop. Is it still possible to monitor the pipelines via appDynamics.

I have gone through this supported environment doc but nothing is specified clearly.

Does anyone have similar experience with AppDynamics?


Solution

  • You can use the package appdynamics to report ETL as business action. For more, please refer to this document you'll find detailed examples.

    from appdynamics.agent import api as appd
    # init agent, you can put args in it
    appd.init()
    # create a handle
    bt_handle = appd.start_bt('ETL work')
    # ETL to monitor
    try:
        do_ETL_work()
    except Exception as exc:
        raise
    finally:
        appd.end_bt(bt_handle, exc)