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

Purepaths are not getting captured-Error in log"Could not read persisted endpoint urls: No such file or directory"

deepali_wagh
Participant
18 REPLIES 18

Radu
Dynatrace Pro
Dynatrace Pro

Hi Deepali,

I'm not sure the message you are seeing is related to PurePaths not getting captured. If you check within the AppMon Client, do you see any warning/error messages for that agent in the Agents Overview dashlet?

Also, are you using this agent to monitor batch jobs? If so, you might have to configure the start of the batch job as a custom entry point for PurePaths to be recognised and captured.

Regards,
Radu



Best regards,
Radu

deepali_wagh
Participant

Thanks for your reply Radu.S!

Yes, I am instrumenting agent for batch job. I am not getting any error or warning related to instrument but


Total PurePath Count:

is always zero. I am not able to capture traffic. Can you please guide with step details on how to add custome entry point for PurePath.

Typically, batch jobs are not standard entry points to transactions, so you will have to configure them yourself for PurePaths to be recorded. What this means is that we will have to put custom sensors on the methods which mark the start of a batch job, and then make sure to set the option to allow these sensors to start PurePaths.

Steps of process:

  • Create a sensor pack in your system profile (System Profile -> Sensors) where you will add the methods you need for your batch jobs
  • For each method which starts a batch job, create a new rule for instrumentation. In the method rule settings, make sure "Capture Events" is checked, and also "Allow to start PurePaths from this method (Entry Point)" is checked.
  • On the Agent Group for these agents, under Sensor Placement, make sure the sensor pack you just created is placed (box is checked)
  • On the Agent Group for these agents, under Sensor Configuration, make sure that the "Capture" column next to the sensor pack you just created is set to "active and start PurePaths"
  • Perform a Host Sensor Placement (if possible) or restart the instrumented process(es).

If you don't know which methods start your batch jobs, it could be helpful to take a CPU Sampling session on one of the agents when the batch job starts, or (if this is a dev/test low impact environment) you can instrument whole classes, see which methods are the ones you need, then keep these and remove the rest of the instrumentation.

Let me know if you need any further help.

Regards,

Radu



Best regards,
Radu

Great thanks for step details: I have followed step details but saw some warnings related to Dynatrace instrumentation, requesting to please check yellow highlighted warnings in the attached screen snap.

Also please cross check second screen snap on the set up for Sensor methods. to start pure path.

cuserse071668picturespointsbanksensor-set-up-scree.png

Observed below limitation on 10000 PurePaths reached. Kindly suggest on 3 new issues.

Hi Deepali,

Explanation on what you are seeing:

1. The errors you are seeing are telling you that you might be instrumenting too many methods. It says that transformation (this is the instrumentation process on the agent) was expected to be max 60 ms but took 242 ms this can be affected by other factors as well (e.g. network latency) but mainly by the amount of instrumentation.

2. Here, the only thing I see worrying is that "all methods(*)" are instrumented on classes which seem system related. Why are you instrumenting the java.lang.ClassLoader and java.lang.ref.ReferenceQueue classes? these are system classes which most likely have nothing to do with your batch job.

3. There is nothing wrong here. By default we load only 10,000 PurePaths into the client. You can right click and increase this limit.

-----------------------------------

Next steps:

  • Remove the instrumentation you added. I don't think any of it will capture your batch job.
  • Take a step back and think about your batch job. Do you know the exact method which starts it? If so add only this method to the sensor, not the whole class.
  • If you don't know your method. Can you at least narrow down the class? or the package? java.lang.ClassLoader, java.lang.ref.ReferenceQueue one of them for loading all classes into memory, the other for referencing the garbage collector. what made you choose these as candidates for the instrumentation?

Regards,

Radu



Best regards,
Radu

Radu
Dynatrace Pro
Dynatrace Pro

If you're using the Spring framework, consider looking inside org.springframework.batch....



Best regards,
Radu

deepali_wagh
Participant

Thanks!

I am unable to identify specific method and class which is required to be added in Dynatrace Sensor.

Also, there are many classes and methods captured in CPU Sampling. Not sure which one to add as a batch job starter method in Dynatrace Sensor.czeusbatch-cpu-sampling.dts. Attached is the partial CPU sampling for reference purpose.

It is useful to group the methods in the CPU Sample by thread (there is a button in top right corner which allows for different group settings), and then follow the methods inside the thread with the most CPU activity (biggest CPU Total Time). I could only find one method that seemed batch related (although I am not 100% sure this is the one). Try instrumenting just this method:

Or, if this does not help. Try looking inside the EnrollmentBatchRunner class (from System Profile -> Sensors -> Browse) to see if other methods might make more sense for instrumentation.

Also, just to make sure - if you did not start the batch job while CPU Sampling was already on then this CPU Sampling session is useless; we need to first start CPU Sampling, then start the batch job in order to capture its starting method.



Best regards,
Radu

deepali_wagh
Participant

Hi Radu,

Please find end to end CPU sampling as suggested by you, still I am unable to locate exact method/class.

Regards,

Deepali Waghczeusbatch-end-to-end-cpu-sample.dts

Have you tried adding a sensor rule for the method I suggested above?



Best regards,
Radu

deepali_wagh
Participant

Hi Radu,

Requesting to explain on point no 3. Not sure where to right click, I tried clicking on 10,000 limit link, System profile with no luck.

3. There is nothing wrong here. By default we load only 10,000 PurePaths into the client. You can right click and increase this limit.

Right click on any of the PurePaths listed there. One of the menu options will be "Result Limit (PurePaths)" and that opens a list that goes from 10 to unlimited.



Best regards,
Radu

deepali_wagh
Participant

Hi Radu,

Sorry for trouble , can you please explain on below queries:

1) I have observed below 3 classes were by default available when I first time tried adding sensors, but enabling there method could not help me to capture batch related stats. Please share inputs on below 3 classes. are those mandate classes for any java related application? can we skip them and add only batch job related classes/ methods.

org.springframework.boot.loader.jar.JarURLConnection

java.lang.ref.ReferenceQueue

java.lang.ClassLoader

2) Do I need to add only starting method of batch job so that complete end to end batch job pure path will get captured or do I need to add all the methods and classes for which I am expecting profiling data.

Regards,

Deepali

,

Hi Radu,

Great Thanks for your patience and support because of which I have made up my mind to stick with Dynatrace and acquire success.

Yes , I have checked adding sensor but no luck, I am checking for another methods also. Can you please provide input on below points.

1) We add sensor for the exact method with which batch job starts processing- Is it my correct understanding

2) Do we need to add all classes and methods from batch for which profiling data is expected or only adding starting class/method will capture end to end stats for entire batch job

3) Initially I have observed below 3 classes which were by default available and when I added sensor for those I could able to capture PurePath but captured data was not relevant for batch jobs- Can you please provide more info on below 3 classes, also are those mandate classes for any Java application. Do I need to disable below 3 classes and check only batch job related classes, Please confirm.

java.lang.ref.ReferenceQueue
classes

java.lang.ClassLoader

org.springframework.boot.loader.jar.JarURLConnection

Regards,

Deepali

Hi Deepali,

1) Your understanding is correct. We need just 1 sensor rule for the method which is called when the batch job starts, the rest of the batch job execution will be recorded with no extra configuration.

2) Just the starting method. The rest of it will be captured by AppMon with no extra configuration needed.

3) I don't understand what you mean "were by default available". By default we have no custom sensors in the system profile. Through the "Browse" button, all packages/classes/methods will become available to put sensors on. The classes you mention are system (JVM) related classes and are invoked very often, with almost every Java application/transaction, that's why you started capturing so many PurePaths and not related to the batch job. From my understanding this is what they do:

  • java.lang.ref.ReferenceQueue -> class for creating and managing a Reference Queue - a queue of references to Java objects in kept memory, created and altered by the JVM Garbage Collector
  • java.lang.ClassLoader -> A Class Loader is responsible for loading into the JVM memory all classes which have code that runs as part of the application. The Java class files are read, a definition is created for each by the Class Loader, and then these definitions are loaded into JVM memory for execution
  • org.springframework.boot.loader.jar.JarURLConnection -> this is a class from the Spring framework, it is used to support accessing JAR files (dependencies/extension of the base code of the application) via URL Connection.

You can remove the sensors for these classes. You do not need them, they just generate a lot of PurePaths for code that is not relevant for monitoring.

Regards,

Radu



Best regards,
Radu

deepali_wagh
Participant

Thanks Radu for your support over the weekend. I will do necessary changes in Sensor and will revert with progress.

deepali_wagh
Participant

Hi Radu,

As per one of the inputs in below link, I have checked with recommended instrumentation step for

org.springframework.boot.SpringApplication.run() with no luck, I have collected error logs and posted details, kindly check and share in case of any further resolutions.

https://support.dynatrace.com/supportportal/browse/SUPDT-39979?_ga=2.169103971.391367981.1511158917-...

Regards,

Deepali

Hi Deepali,

As at this point your question is beyond me and you have already opened a support ticket I suggest continuing with our Support team - they will be able to help you further.

Regards,

Radu



Best regards,
Radu

deepali_wagh
Participant

Ok, thanks for your support so far.