cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Using Appmon ADK to instrument Python script, and connect external purepath

sebastian_kryst
DynaMight Leader
DynaMight Leader

Hello,

I have application written in Pylons framework to instrument using ADK. I'm using https://www.dynatrace.com/blog/inside-the-black-bo... this description to figure it out how to do this. I've got my ADK agent online and I can see some purepaths but:

  1. I have problem with create complex purepaths. I'm instrumenting mostly controllers but there I have PP with 1-3 methods visible and that's all. I have no idea how to find main entrypoint and start purepaths there. Any idea? Another thing is that there is problem with using start purepath and sensor. Because controller methods mostly are not nested I have to add everywhere Start Purepath to se anything more than one metod at once. I've also modified script from article like so:
@contextlib.contextmanager
def start_purepath(params_to_capture=None, method=None):
dttag = DYNATRACE_GET_TAG_AS_STRING()
DYNATRACE_LINK_CLIENT_PUREPATH_BY_STRING(synchronous=False, dynatrace_tag=dttag)
dynatrace_method_id, dynatrace_serial_no = DYNATRACE_START_PUREPATH(
params_to_capture=params_to_capture, method=method)
yield
DYNATRACE_EXIT(dynatrace_method_id, dynatrace_serial_no)
DYNATRACE_END_SERVER_PUREPATH()

Without adding tag Dynatrace could catch paths as one. But sometimes paths are corrupted. I'm quite confused about it.

2. Another question I have is if it's possible to connect purepath start with apache2 which is in front of pylons app. No I have no idea how to do that. I've got Apache instrumented with UEM and it's working fine, it would be great to see what was after WebRequest call on python side.

I'm using appmon 7.0.12 with current version of ADK. Python is 2.7.13

1 REPLY 1

rick_boyd
Mentor

I will dig into this more, but if your app is behind apache2 then you should see an x-dynatrace header on the request at the pylon layer. You can use this as the client dttag for linking purposes