Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

WCF based organization service traceablity

Posted on by Microsoft Employee

Hello,

I hope that someone will help with the following question, because I did not find info elsewhere.

Background

We have a module (custom development based on .NET stack) which is working as a facade for MS Dynamics 365. This module has Web API to handle some business cases.

Simplified scenario:

scenario.png

We would like to use correlation mechanism in MS Dynamics 365 to trace activity as well as track down full request flow in case of error.

Because CRM OrganizationService is based on WCF I enabled activity trace and it seems working: all the SOAP requests/responses are chained by the same activity id.

req1.png

req2.png

Problem

Despite the fact that single activity id is used to chain communication with MS Dynamics 365, but in case of error on the CRM side (i.e. plugin) CRM trace log contains different activity id. Also this id is not consistent, every error entry will have different activity id. 

Trace log sample:

[2019-04-15 06:29:50.161] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 24 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: d1f15ac2-e656-4261-b7f5-6e7d85b8b1dc |ActivityId: 0bdf629c-f154-4ef7-bc99-330b6a6fc84b | EntityMetadataNotFoundException..ctor ilOffset = 0x1B
at EntityMetadataNotFoundException..ctor(String entityName, NameMappingType mapping) ilOffset = 0x1B
at DynamicMetadataCache.GetEntity(String entityName, NameMappingType mapping) ilOffset = 0x13
at SdkRequestDescription.GetObjectTypeCodeFromFieldWithMask(Object fieldValue, FieldMasks fieldMask, IOrganizationContext context) ilOffset = 0xEB

Question

Maybe someone knows if MS Dynamics 365 supports correlation ids when client is an external system (I know that internal plugin during execution has correlation Id as a execution context property)? Or perhaps I have wrong view regarding MS Dynamics 365 traceability?

*This post is locked for comments

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans