Apigee on prem edge message processor java instrumentation with AppDynamics Java agent

Greetings,

want to do Apigee on prem edge message processer java process instrumentation with Appdynamics Java agent, so that we get insight into transactions. Technically this is doable.

Is it supported by Apigee? I wonder if anyone can share their experience lately with this.

I am aware of JMX and appdynamics extensions but that does not give detailed insight.

Thank you.

0 4 617
4 REPLIES 4

Nope. Instrumenting the Java JARs is not supported. You can try it, but we don't support it that way.

I think you can find some previous Q&A here on community on this topic. Search the archives?

Thanks @Dino-at-Google Appreciate your swift response. I am curious if anyone has experienced this implementation lately.

I did search the archives before, all posts were back dated to 2016-early 2017. I was curious if things have changed in last two years.

@Dino-at-Google, Is there any tool (like AppD) supported by apigee for business transaction monitoring?

This article (2 years old) is still applicable: https://community.apigee.com/articles/37595/apm-integration-with-apigee.html

And if the API clients are instrumented, here's some code you can use to return useful information about the API execution (including a unique messageId).

The Javascript code can be invoked via a Javascript policy in a Shared Flow, and then configured as a Post-Proxy Flow Hook

// Measure request, target and response processing time based on analytics flow variables.

// If target.sent.end.timestamp is null, no call to the backend has been made. 
// Either because there was a fault 
// while processing the request, or it's the proxy standard behaviour.
// Either way, use client.received.end.timestamp as the end of the 
// request/start of response to measure elapsed times.
// Include the target latency header only in the case where the target 
// was actually invoked if (context.getVariable("target.sent.end.timestamp") !== null) { endOfReqProcessingVarName = "target.sent.end.timestamp"; startOfRespProcessingVarName = "target.received.start.timestamp"; setElapsedHeader("target.sent.end.timestamp", "target.received.start.timestamp", "X-Apigee-TargetLatency"); } else { endOfReqProcessingVarName = "client.received.end.timestamp"; startOfRespProcessingVarName = "client.received.end.timestamp"; } setElapsedHeader("client.received.start.timestamp", endOfReqProcessingVarName, "X-Apigee-RequestProcessingTime"); // At this stage the Analytics variable client.sent.end.timestamp // has not been set yet // We estimate it with system.timestamp setElapsedHeader(startOfRespProcessingVarName, "system.timestamp", "X-Apigee-ResponseProcessingTime"); // Set header with unique messageId context.setVariable("message.header.X-Apigee-Message-ID",context.getVariable("messageid")); // Utility function: Calculate difference between two timestamps // held in flow variables and set a header with it function setElapsedHeader(startTimestampVar, endTimestampVar, hdrName) { //Using message makes sure the header is included // whether it is a successful response or an error context.setVariable("message.header."+hdrName, context.getVariable(endTimestampVar)-context.getVariable(startTimestampVar)); // print("Setting " + hdrName + " to the difference between " + context.getVariable(endTimestampVar) + " and " + context.getVariable(startTimestampVar)); // print("Set it to: " + context.getVariable("message.header."+ hdrName)); }