web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Telemetry class Error in D365 .42 version

(3) ShareShare
ReportReport
Posted on by 167
Hi,

I am getting the below error while running a batch job and it
 
Method not found: 'Dynamics.AX.Application.SysApplicationInsightsTelemetryContractBase Dynamics.AX.Application.SysApplicationInsightsTelemetryContractBase.addProperty(Dynamics.AX.Application.SysApplicationInsightsProperty)'.
Telemetry Event Processing Error: className : CustomTelemetryBatchLogging - EventName: Custom BATCH ERROR
Batch task failed: MissingMethodException
 
I have extended the global class for logging the telemetry but getting the above errors , I havent called the "SysApplicationInsightsTelemetryContractBase" class but it seems it is referring somewhere .
This was working fine long time back but it has started giving error recently.
 
thanks,
VK
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    239,602 Most Valuable Professional on at
    What is the code causing the error?
     
    Do I understand correctly that the standard Monitoring and telemetry works a bug is only in your CustomTelemetryBatchLogging class?
  • VM-02050213-0 Profile Picture
    167 on at
    Hi Martin,
     
    I am calling the prehandler for 
     [PreHandlerFor(classStr(Global), staticMethodStr(Global, error))]
    and then getting the below error. It is actually overriding the std error message.
    Method not found: 'Dynamics.AX.Application.SysApplicationInsightsTelemetryContractBase Dynamics.AX.Application.SysApplicationInsightsTelemetryContractBase.addProperty(Dynamics.AX.Application.SysApplicationInsightsProperty)'.
    Telemetry Event Processing Error: className : CustomTelemetryBatchLogging - EventName: Custom BATCH ERROR
    Batch task failed: MissingMethodException
     
    Thanks,
    Vikas
  • Suggested answer
    Martin Dráb Profile Picture
    239,602 Most Valuable Professional on at
    What you're trying to implement is already included in F&O out-of-the-box, therefore the right fix likely is throwing your code away.
     
    There is a feature called Monitoring and telemetry that covers your scenario - and several others. The logging of errors is implemented in SysGlobalTelemetry::Global_Pre_error() method. To learn more, check out Dynamics 365 Finance & Operations Monitoring and Telemetry using Application Insights, for instance.
  • VM-02050213-0 Profile Picture
    167 on at
    Hi Martin,
     
    The problem is that the std telemetry does not have proper dimension in place to create the dashboards and with the custom ones we can add our own dimension to monitor and add more details as well.

    So we can enable and disable the logging for any custom process from the below screen.
    HowToDisableParticularTelemetry.png
    So the issue is that I am getting the error logs for other processes but not for a particular one and the erroneous batch job has the same try catch methodology implemented.
    What i am not able to figure out is for the below error the standard class "SysApplicationInsightsTelemetryContractBase" is not even having the add property method so from where its being called . its not even showing in the debug. Is there a way i can check if this class is updated to new version ?

    Method not found: 'Dynamics.AX.Application.SysApplicationInsightsTelemetryContractBase Dynamics.AX.Application.SysApplicationInsightsTelemetryContractBase.addProperty(Dynamics.AX.Application.SysApplicationInsightsProperty)'.
    Telemetry Event Processing Error: className : CustomTelemetryBatchLogging - EventName: Custom BATCH ERROR
    Batch task failed: MissingMethodException
     
    thanks,
    VK
  • Martin Dráb Profile Picture
    239,602 Most Valuable Professional on at
    Now you seem to be mixing two different things.
     
    The setup doesn't seem to be related to your extension of Global::error() at all. It's about custom events that you'll call from places like WhsShipConfirm_Extension. You believe that you must develop your own solution because the one from Microsoft doesn't support custom properties, but it's not true. It can be done by code like this:
    Map properties = new Map(Types::String, Types::String);
    properties.add('Feature', 'My feature 1');
    properties.add('MyCorrelationId', '123456');
     
    SysGlobalTelemetry::logTraceWithCustomProperties('Custom message from X++', properties)
    Therefore both scenarios are covered by SysGlobalTelemetry, so you don't have to invest time fixing your custom solution.
  • VM-02050213-0 Profile Picture
    167 on at
    Thanks Martin for taking out time to check the telemetry code.
    I have written similar code previously but as per Microsoft this is an old way and a better approach is to create the custom classes for processes and extend them to telemetry classes as per link D365-FO-MonitoringAndTelemetry-Samples and then add those properties.
    We can even enable /disable logging for those processes.
     
    Map properties = new Map(Types::String, Types::String);
    properties.add('Feature', 'My feature 1');
    properties.add('MyCorrelationId', '123456');
     
    SysGlobalTelemetry::logTraceWithCustomProperties('Custom message from X++', properties)
    For Eg.
    final class TelemetryPurchaseOrderConfirm extends MyTelemetryBase
    protected void populateProperties()
        {
            // Setting elapsed milliseconds in the concrete implementation so that the implementer can decide what is the right way to get elapsed time.
            this.setElapsedMilliseconds();
            this.addBaseProperty(MyApplicationInsightsEventProperties::PurchId, purchTable.PurchId);
            this.addBaseProperty(MyApplicationInsightsEventProperties::PurchStatus, strFmt("%1", purchTable.PurchStatus));
            this.addBaseProperty(MyApplicationInsightsEventProperties::DeliveryDate, DateTimeUtil::toStr(purchTable.DeliveryDate));
        }
    If I want I can enable or disable the metric for this later on .
    The major reason is that the std code is generic and it wont print more details about a process. For example lets say a PO invoice is done in for 1000's of line and we will get a generic error and wont get the exact line where the error sits for which line and hence the customization.

    Thanks,
    VK
  • Martin Dráb Profile Picture
    239,602 Most Valuable Professional on at
    You surely can create classes like TelemetryPurchaseOrderConfirm, but that doesn't mean that you need to duplicate the component communicating with Application Insights. Your classes can use the existing API and simply add any logic on top of it. The standard feature expicitly supports custom events and metrics.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 771

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 629 Super User 2026 Season 1

#3
Subra Profile Picture

Subra 496

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans