Java (Java Agent, Installation, JVM, and Controller Installation)

Showing results for 
Search instead for 
Did you mean: 

Custom Business Transactions


Custom Business Transactions

I started crerating Business transactions:



ITransactionDemarcator delegate = AgentDelegate.getTransactionDemarcator();
delegate.beginOriginatingTransactionAndAddCurrentThread(getKey(), getKey());


// Success:

// Failure:
delegate.endOriginatingTransactionAndRemoveCurrentThread(lastError, e);


Update #1


So I was looking at the log files for the agent, I found a few stange issues in both BusinessTransactions.2019_01_17__12_59_50 and dynamic-service.2019_01_17__12_59_50


[AD Thread Pool-Global1] 17 Jan 2019 13:02:21,368 WARN com.singularity.dynamicservice.DynamicServiceManager - invalid manifest format attempting to read file C:\Users\prubin.INGRNET\Downloads\AppServerAgent-\ver4.5.6.24621\external-services\analytics\analytics-dynamic-service.jar invalid manifest format

[AD Thread Pool-Global1] 17 Jan 2019 13:02:21,370 WARN com.singularity.dynamicservice.DynamicServiceManager - invalid manifest format attempting to read file C:\Users\prubin.INGRNET\Downloads\AppServerAgent-\ver4.5.6.24621\external-services\netviz\netviz-adapted.jar invalid manifest format


none of the other logs had anything that resembled an error.



The transactions are showing in the controller, but when I try double clicking on the error transactions to see the details I get "input guid is not in a valid format"  Is this something I did in the java code, something misconfigured in the agen configuration, or something misconfuigured in the controller?


Update #2


Ok, I had to generate a GUID for each transaction. In the final version this will not be generated at this step.

delegate.beginOriginatingTransactionAndAddCurrentThread(getKey(), UUID.randomUUID().toString());

I tried adding parameters to the transaction but I cannot figure out how to see them in the UI:

delegate.addPropertyForCurrentThread("Tenant", "Tenant212");
delegate.addPropertyForCurrentThread("SateliteServer", "Tenant212-abc");

Where can this data be located?

Tags (1)
Custom Business Transactions

Re: Custom Business Transactions



Can I ask what you are trying to achieve with the agent API?


To answer your sirect question, I suspect that the thread properties you are adding will be visible in the "more details" section of the snapshot viewer:


Screen Shot 2019-01-21 at 15.30.58.png

Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Re: Custom Business Transactions

More details lists the trasaction id, but not the values added with addPropertyForCurrentThread properties.  I have added a session id, unit of work id and neither is showing up anywhere I can see them.