Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. (Agent can connect to the CMR)
  2. CMR find environment for the agent
    1. Environment is found by mapping table consisting of agent IP and name.
    2. If no environment is found, CMR and Agent log the problem and agent stop trying. Only restarting the agent will start over the process.
  3. CMR sends initial information to the agent called AgentConfiguration
    1. Based on the environment
    2. Agent-ID
    3. Configurations like sensors, strategies
  4. Full initialization mode
  5. Process all classes that were loaded while the agent was not fully initialized

Connection to CMR breaks

  1. Agent is in disconnected mode
  2. Agent collects all classes that are loaded and safe the name of them
  3. When connection is attained again process all classes

Process loaded classes

  1. (either called through normal class loading or though reloading triggered by the CMR)
  2. Calculate hashcode for the class
  3. Figure out if this class needs to be sent to the server

Process "bytecode resend" request

  1. Agent updates cache to mark this class to be instrumented/send
  2. Load bytecode from JVM (open)
  3. Send bytecode to the CMR

Process "Redefine" request

  1. Redefine class based on the given class
  2. If the bytecode is marked as original, mark this class in the cache as "not needed for instrumentation"
  3. If the bytecode is marked as non original, verify that cache has this class as "needed for instrumentation"

Update environment (instrumentation configuration)

  1. Enduser on the UI updates the configuration (environment)
  2. Update the AgentConfiguration for all agents using this environment
  3. Run the changed environment against the class cache again. Class cache returns changed entities:
    1. "Bytecode resend" request: Class that was not instrumented before:
      1. Tell the agent to send the bytecode for this class again. (The class will undergo normal parsing & instrumentation process and the result will be returned to the agent.)
    2. "Redefine" request: Class that was instrumented before:
      1. Load original bytecode from cache in the CMR
      2. Run the instrumenter on this bytecode and send the bytecode to the agent. Mark if it is original bytecode.

 

 

 

 

 

 

 

 

Gliffy
nameBigPicture

...