Update Context or Transaction Result in Java Public API

There are no methods for setting transaction.result or context.request.url.full. These fields are displayed in the APM Dashboard as "URL" and "Result" for sample transactions.

I am using sparkjava for a webservice which is not supported, so I believe that the public api is my only option, but it would be nice to set these fields.

Any ideas?

Hi and thanks for your question.

The public API is somewhat limited in scope so that it's easier to maintain backwards compatibility and easier to use/harder to shoot yourself in the foot.

What you can to is to use the setTag method to add the url as a tag to the transaction. That won't show it in the exact same spot but at least you could see it in the tags tab of the UI.

However, I agree that at least there should be a setResult method for transactions.

If you want to build a deeper and more sophisticated framework integration including auto-instrumentation you can have a look at the contributing instructions. By doing that, you have full access to the internal API.

I hope that helps :slight_smile:


Version 1.0 contains a setResult method

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.