DX Application Performance Management

  • 1.  Re: Javascript Calculator - Rolling Metric Count

    Posted Sep 20, 2017 03:43 PM

    Hello Friends,

     

    I'm trying to fit this example to resolve a requirement of the client, but when I deployed the javacript file, introscope present the following message in the log file:

     

    9/20/17 02:01:25.100 PM COT [ERROR] [Harvest Engine Pooled Worker] [Manager.JavascriptEngine] Exception with script /apm/Introscope10_5_1_8_MOM/./scripts/goodBusinessTransactionsDailyRunningTotal.js: org.mozilla.javascript.EcmaError: TypeError: Cannot call method "getTime" of undefined (/apm/Introscope10_5_1_8_MOM/./scripts/goodBusinessTransactionsDailyRunningTotal.js#180)

     

    Can anybody give me a hand with this problem?

     

    Thanks,

     

    Henry.



  • 2.  Re: Javascript Calculator - Rolling Metric Count

    Broadcom Employee
    Posted Sep 20, 2017 03:50 PM

    Hi Henry,

    Please post this "getTime” method from your script and where it gets called.



  • 3.  Re: Javascript Calculator - Rolling Metric Count

    Broadcom Employee
    Posted Sep 20, 2017 03:50 PM

    Created a new branch and included APM Developer.



  • 4.  Re: Javascript Calculator - Rolling Metric Count

    Posted Sep 20, 2017 04:41 PM

    Hello Haruhiko,

     

    The method if the following:

     

    function daysBetween(first, second) {
       return ( Math.round((second.getTime()-first.getTime())/(1000*60*60*24)) );
    }

     

    it's called in this way:

     

    if(daysBetween(lastCheck,new Date()) < 1)

     

    or

     

    if(daysBetween(agentList[agent]['lastSeen'],new Date()) < 1)

     

    Please let me know if you can see what is the problem.

     

    Thanks,

     

    Henry.-



  • 5.  Re: Javascript Calculator - Rolling Metric Count

    Posted Oct 20, 2017 01:02 PM


  • 6.  Re: Javascript Calculator - Rolling Metric Count

    Broadcom Employee
    Posted Oct 23, 2017 07:49 PM

    Yes, thank you for refreshing my memory on this. I apologize for losing track of this issue.

     

    AngelicaHerrenoGomez If you still need help with this, please let me know so we can work on this together.



  • 7.  Re: Javascript Calculator - Rolling Metric Count

    Broadcom Employee
    Posted Oct 25, 2017 01:06 PM

    I'm working privately with Henry. We'll post the results when the issue is resolved.