Question

AppDynamics integration with Acumatica 2020R2

  • 18 December 2020
  • 2 replies
  • 102 views

Userlevel 1

Hi,

I have a customization project based on Acumatica and i need to use AppDynamics in order to enable runtime monitoring (response time, db calls, etc.).

For webforms based applications, AppDynamics provides some javascript code to be included on master pages. As a proof of concept, i used this code in a webforms app generated by VS19 and i can see metrics in AppDynamics.

You can see below the Javascript code included in the master page of my POC project.

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="POC.SiteMaster" %>

<!DOCTYPE html>

<html lang="en">
<head runat="server">

<asp:PlaceHolder runat="server">
<%: Scripts.Render("~/bundles/modernizr") %>
</asp:PlaceHolder>

<script charset="UTF-8" type="text/javascript">
window["adrum-start-time"] = new Date().getTime();
(function (config) {
config.appKey = "APP-DYNAMICS-SECRET-KEY";
config.adrumExtUrlHttp = "http://cdn.appdynamics.com";
config.adrumExtUrlHttps = "https://cdn.appdynamics.com";
config.beaconUrlHttp = "http://pdx-col.eum-appdynamics.com";
config.beaconUrlHttps = "https://pdx-col.eum-appdynamics.com";
config.resTiming = { "bufSize": 200, "clearResTimingOnBeaconSend": true };
config.maxUrlLength = 512;
})(window["adrum-config"] || (window["adrum-config"] = {}));
</script>
<script src="//cdn.appdynamics.com/adrum/adrum-20.9.0.3268.js"></script>

</head>

When i want to apply my POC in Acumatica code, i m faced to many problems :

  • I don’t know how to customize master pages in order to include my javascript code ? I don’t want to replace entirely master page provided by acumatica, i want only to extend its behaviour with a call for some Javascript code or some bundle JS.
  • I don’t understand bundle logic in acumatica and how to extend it with my own bundle ? I don’t find for example microsoft classes like BundleTable, ScriptBundle that i used in my POC (see for example this link which talk about bundles in webforms).

Could you please provide a little example of master page customization with :

  • Adding in master page head tag some basic javascript code like : alert(“hello from js code”)
  • Adding in master page head tag some javascript bundle like : Scripts.Render("~/bundles/my-alert-in-bundle")

Thanks in advance


2 replies

Userlevel 1

 

Could you please provide a little example of master page customization with :

  • Adding in master page head tag some basic javascript code like : alert(“hello from js code”)
  • Adding in master page head tag some javascript bundle like : Scripts.Render("~/bundles/my-alert-in-bundle")

Thanks in advance

Standard Acumatica customization engine has Javascript component that can be used to add JS to pages. 

However it does not allow to target <head /> tag specifically.  You can set property IsStartupScript = true to ensure script rendered at the end of the page though.  

Userlevel 1
Hi nmansinha, First of all, thanks for your response, I didn't know about this trick and it's good to know.
However, it doesn't exactly meet my need. I want to run the same script on all the pages. With this solution, I have to customize all the pages, which is impossible.
Is there any way to put my javascript code [alert(“hello”);] in one place and run it on all acumatica pages ?
Thanks in advance

 

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2020  Acumatica, Inc. All rights reserved