This suggestion is about raw logs ("Slow queries") in LCS environment monitoring.
In some cases, raw logs show that a query originated from a form, but the stack trace doesn't mention which form it was, which greatly decreases its value. Sure, we sometimes can find the query by cross-references or just understanding the business domain, but getting the information straight away would be much better.
I don't suggest any technical solution, because I don't know how it works under the hood.
Below is a real-life example of such a stack trace.
=====
at [AosKernel.dll]Microsoft.Dynamics.Ax.MSIL.Interop.GetManagedCallStack(basic_string\,std::allocator >* )
at [AosKernel.dll]Microsoft.Dynamics.Ax.Services.AOSAppDomainHelper.callGetManagedCallStack(basic_string\,std::allocator >* )
at callGetManagedCallStack(basic_string\,std::allocator >* )
at cqlClass.callEx(cqlClass* , Char* , interpret* )
at cqlClass.callEx(cqlClass* , Char* , interpret* )
at [AosKernel.dll]Microsoft.Dynamics.Ax.MSIL.cqlClassIL.Call(IntPtr c, String methodName, Object[] parameters, Type[] types, Object[] varargs, Type[] varargsTypes)
at [Microsoft.Dynamics.AX.Server.Core.dll]Microsoft.Dynamics.Ax.Xpp.XppObjectBase.Call(String methodName, Object[] parameters, Type[] types, Object[] varargs)
at [Microsoft.Dynamics.AX.Xpp.Support.dll]Dynamics.AX.Application.NativeQueryRunImplementation.next()
at [Microsoft.Dynamics.AX.Xpp.Support.dll]Dynamics.AX.Application.QueryRun.next()
at QueryRun::next(Object , Object[] , Boolean& )
at [Microsoft.Dynamics.AX.Xpp.Support.dll]Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters)
at callILClassMethod(interpret* ip, Char* method, UInt32 chdl, cqlClass* c)
at cqlClass.call(cqlClass* , Char* , Int32* , interpret* )
at cqlClass.call(cqlClass* , Char* , Int32* , interpret* )
at [AosKernel.dll]Microsoft.Dynamics.AX.DataAccess.Kernel.NativeCqlRecordCollection.LoadInitialData(Int32& rc)
at Microsoft.Dynamics.AX.DataAccess.Kernel.Proxy.CIRecordCollection.LoadInitialData(CIRecordCollection* , Int32* rc)
at cqlClass.callEx(cqlClass* , Char* , interpret* )
at cqlClass.callEx(cqlClass* , Char* , interpret* )
at [AosKernel.dll]Microsoft.Dynamics.Ax.MSIL.cqlClassIL.Call(IntPtr c, String methodName, Object[] parameters, Type[] types, Object[] varargs, Type[] varargsTypes)
at [Microsoft.Dynamics.AX.Server.Core.dll]Microsoft.Dynamics.Ax.Xpp.XppObjectBase.Call(String methodName, Object[] parameters, Type[] types, Object[] varargs)
at [Microsoft.Dynamics.AX.FormsEngine.dll]Dynamics.AX.Application.FormDataSource.executeQuery()
at FormDataSource::executeQuery(Object , Object[] , Boolean& )
at [Microsoft.Dynamics.AX.Xpp.Support.dll]Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters)
at callILClassMethod(interpret* ip, Char* method, UInt32 chdl, cqlClass* c)
at cqlClass.callEx(cqlClass* , Char* , interpret* )
at cqlClass.callEx(cqlClass* , Char* , interpret* )
at [AosKernel.dll]Microsoft.Dynamics.Ax.MSIL.cqlClassIL.Call(IntPtr c, String methodName, Object[] parameters, Type[] types, Object[] varargs, Type[] varargsTypes)
at [Microsoft.Dynamics.AX.Server.Core.dll]Microsoft.Dynamics.Ax.Xpp.XppObjectBase.Call(String methodName, Object[] parameters, Type[] types, Object[] varargs)
at [Microsoft.Dynamics.AX.FormsEngine.dll]Dynamics.AX.Application.FormDataSource.research()
at [Dynamics.AX.ApplicationFoundation.dll]Dynamics.AX.Application.FilterManagerControl.`SetSorts(List dataSourceFilterExpressionList, String ascending, String clearSorts, String controlName, String sortLabel, Boolean @ascending_IsDefaultSet, Boolean @clearSorts_IsDefaultSet, Boolean @controlName_IsDefaultSet, Boolean @sortLabel_IsDefaultSet) in xppSource://Source/ApplicationFoundation\AxClass_FilterManagerControl.xpp:line 226
at [Dynamics.AX.ApplicationFoundation.dll]Dynamics.AX.Application.FilterManagerControl.FilterManagerControlCoCHelper.`SetSorts(FilterManagerControl instance, List arg0, String arg1, String arg2, String arg3, String arg4, Boolean , Boolean , Boolean , Boolean )
at [Dynamics.AX.ApplicationFoundation.dll]Dynamics.AX.Application.FilterManagerControl.SetSorts(List dataSourceFilterExpressionList, String ascending, String clearSorts, String controlName, String sortLabel, Boolean @ascending_IsDefaultSet, Boolean @clearSorts_IsDefaultSet, Boolean @controlName_IsDefaultSet, Boolean @sortLabel_IsDefaultSet)
at [Dynamics.AX.ApplicationFoundation.dll]Dynamics.AX.Application.FilterManagerControl.SetSorts(List dataSourceFilterExpressionList, String ascending, String clearSorts, String controlName, String sortLabel)
at FilterManagerControl::SetSorts(Object , Object[] , Boolean& )
at [Microsoft.Dynamics.AX.Xpp.Support.dll]Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeInstanceCall(Object instance, String MethodName, Object[] parameters)
at [Microsoft.Dynamics.AX.Xpp.Support.dll]Microsoft.Dynamics.Ax.Xpp.DictClass.Callobject(String _methodName, XppObjectBase _Called, Object[] varArgs)
at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.FormControlUtil.`invokeCommandWithSerializedArgs(FormControl _control, String _commandName, Object[] _arguments, Object[] _argumentTypes) in xppSource://Source/ApplicationPlatform\AxClass_FormControlUtil.xpp:line 160
at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.FormControlUtil.FormControlUtilCoCHelper.`invokeCommandWithSerializedArgs(FormControlUtil instance, FormControl arg0, String arg1, Object[] arg2, Object[] arg3)
at [Dynamics.AX.ApplicationPlatform.dll]Dynamics.AX.Application.FormControlUtil.invokeCommandWithSerializedArgs(FormControl _control, String _commandName, Object[] _arguments, Object[] _argumentTypes)
at FormControlUtil::invokeCommandWithSerializedArgs(Object[] , Boolean& )
at [Microsoft.Dynamics.AX.Xpp.Support.dll]Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
at callILClassMethod(interpret* ip, Char* method, UInt32 chdl, cqlClass* c)
at [AosKernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionHandler.InvokeCommand(CommandInteraction interaction, CommandCallbackInteraction& result)
at [AosKernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionHandler.HandleCommandInteraction(CommandInteraction interaction, List`1 outboundInteractions)
at [AosKernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionHandler.HandleInteractions(IInteractionChannel interactionChannel)
at [AosKernel.dll]Microsoft.Dynamics.Client.ServerForm.Interactions.InteractionManager.ProcessMessages(Object stateinfo)
at [mscorlib.dll]System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at [mscorlib.dll]System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at [mscorlib.dll]System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at [mscorlib.dll]System.Threading.ThreadPoolWorkQueue.Dispatch()
Lane Swenka (administrator) on 6/24/2019 11:06:19 PM
Thank you for your feedback.
Currently this is not in our roadmap; however, we are tracking it and if we get more feedback and votes, we may consider it in the future.
Sincerely,
Lane,
Microsoft.