APM for Python

We recommend using the open-source dd-trace-py library to instrument your python applications. You can find the detailed docs on how to instrument here.

Send traces to ArchSaber's APM agent

You need to make sure that the generated traces will reach ArchSaber's APM agent, which will then process and forward it to ArchSaber. This step depends upon how you have deployed the agent.


You don't need to do anything. The library, by default, sends traces to localhost:8126, which is also where the agent listens at.


If you have installed the agent as a docker container on the same network (non-default bridge) as your application container(s), you will need to make the agent's container name available to your application.

  1. If you are running your app as [ENV_VARS] ddtrace-run <my_program>, you will need to set the DATADOG_TRACE_AGENT_HOSTNAME environment variable to the name of the container which is running ArchSaber's APM agent.

  2. If you are configuring your tracer inside the code like this, specify the container name there.

  3. If you are tracing your Django framework like this, specify the container name as following in your settings.py file

    'DEFAULT_SERVICE': <your-service-name>,
    'AGENT_HOSTNAME': <agent-container-name>,


In this case, the agent is deployed as a daemonset on every node of your cluster. It listens on the node's network address space at port 8126. You can expose the node's name to your application via an env variable in the Kubernetes yml file of your application deployment as shown below.

      fieldPath: spec.nodeName

ARCHSABER_AGENT_HOSTNAME environment variable can then be used to configure the library to send traces to the agent.

results matching ""

    No results matching ""