SlideShare a Scribd company logo
Guidelines and examples to plugin
development for continuous tracing and
advanced analysis using XrmToolBox
Jonas
Innofactor Sweden
Rapp
Plugin development for
analysis
Jonas Rapp var jonas = (WhoAmIResponse)service.Execute(new
WhoAmIRequest());
Head of Development, Innofactor SE
Cinteros
Developer
Since 1994, Dynamics CRM since 2009
XrmToolBox contributor
Since 2014
Speaker
2017: CRM Saturday, eXtreme365
MVP
2017
Twitter: @rappen
Email: jonas.rapp@innofactor.com
Blog: jonasrapp.innofactor.se
Audience var audience = (WhoAreYouResponse)service.Execute(new WhoAreYouRequest());
Developers?
C# Developers?
XrmToolBox users?
XrmToolBox contributors?
CRM Debuggers?
Plugin Trace Viewers?
Background
Living with the platform
– or –
Teaching a developer to love the handcuffs of Microsoft Dynamics CRM
The Handcuffs of CRM
From SW dev to MSDynCRM dev
You are not in control
Injecting our code
Can’t take back control
The black box is still black
And it is getting darker in the cloud
Have the box work for you
Improve monitoring, pick up signals
Hawking radiation emitted from a black
hole
Making the cuffs more comfortable
The Handcuffs of CRM
Create your radiation
Write logs
Throw correct exceptions
Relevant messages
try-catch for valid call stacks
Add noop triggers for
logging
Injectable contrast
Simplify development
Supporting libraries
Intialization of service etc
Embed logging
Deployment routines
Upload of webresources
Deployment of plugins
Export / import solutions
etc.
Introduction
Plugin investigation in Microsoft Dynamics 365
Plugin investigation options
Debugging
Plugin Profiler
Plugin Registration, record
context and “replay” during
debugging
Attach to process
Onprem only
Mocking context
Hard code mocked events,
communication with CRM
limited
Analyzing
OOTB Logging
Server Trace file
Plugin Trace Log
Custom Logging
File
Event viewer, External service
Custom entity
Plugin investigation options
Debugging
Concept
Try to reproduce bugs to monitor
behavior
Ad hoc mimicking – “watching
quarks”
Environment
Dev/Test
Access
Plugin Registration
Server process
Analyzing
Concept
Look at actual recorded events
Review history – “walk
backwards”
Environment
Any
Access
Onprem server access
Elevated user
Plugin Analysis – Out of the Box
Server Trace file
Onprem only, requires server access
Hard to see the forest through the trees
Plugin Trace Log
Sandboxed only
OOTB UX discouraging
Plugin Trace Log
Plugin execution
information
Start time, Duration, Id, …
Step and Context details
Pipeline details
Custom logging
Initialize ITracingService
Write logging information
• Message Body
• Exception Details
Availability
Settings – Plug-in Trace Log
Exceptions
• Sync plugins exceptions
• Settings – System Jobs
Introduced
CRM 2011 – exceptions only
• Plugins
• Async jobs
CRM 2015 U1 – Entity and UI
Plugin Trace Log
Activation
System Setting
• Off
• Exceptions
• All
Written async
After execution completed
Considerations
Always on?
• Performance impact
Recurring bulk delete job!
• Default is provided
Detail level
• Message Block max 10k
Demo 1
Plugin Trace Log OOTB
Custom Tools
Making plugin investigation easier
Plugin Trace Log – 3rd Party Help
What
Plugin Trace Viewer
A tool in the “industry
standard” XrmToolBox
Alternative UI
Presenting information from
the Plugin Trace Log in a more
appetizing way
Purpose
Empower the Plugin Trace
Log
Filtering
Grouping
Quick-view
Empower YOU
Make it easy to find relevant
information from the log
Plugin Trace Log – Base class
What
Plugin base class
Implements IPlugin
Encapsulates target entity,
images, service, trace etc.
Custom service class
Implements
IOrganizationService
Writes log and timing to trace
Purpose
Make tracing seamless
Code as you always code
Get tracing for free
Streamline development
Focus on business logic, not
repetitive common tasks
Demo 2
Simple plugin using base class
First glance at the Plugin Trace Viewer
Context logging plugin
Correlation
A walk down memory lane
Plugin Trace Log – Correlation Id
What
Guid related to plugin
execution
Maintained through entire
pipeline
Stored in each trace log record
Available in IExecutionContext
How do events correlate?
Purpose
CRM Core
Used to prevent infinite loops
Plugin Trace Viewer
Follow execution chains
Trace events triggering events
Our breadcrumb trail in the
forest
Plugin Trace Viewer – Correlation Id
How
Identify log records with
same Id
Guids transposed to single
letters
No letter for single unique
records
Select all connected records
Filter by correlation id(s)
Purpose
Our breadcrumb trail
Cherry picking the trace log
Connect the dots
Originating from one (1) event
Demo 3
Correlation Id
Plugins triggering plugins
Exception origins
More analysis tools
Aggregated lifetime stats
Plugin Type Statistics
Organization Insights
Plugin Type Statistics
Aggregated stats about
plugins
Execution count
Failure count
Average execution time
Crash count and reasons
Cannot be reset
In CRM
Advanced Find, like any entity
In Plugin Trace Viewer
Show Statistics panel
Organization Insights
Availability
Preview Dashboard (being
replaced)
Marketplace Solution
(replacing)
Metrics about the instance
Activity statistics
Dimensions
Operations (CRUD)
Requests (Form, Report,
Dashboard)
Plugin (Executions, Failures)
Entity
User
Organization Insights – Preview
Dashboard
Organization Insights – Activity
Organization Insights – Plugins
References
Code
JonasPluginBase project https://github.com/rappen/JonasPluginBase
JonasPluginBase NuGet package https://www.nuget.org/packages/Rappen.Xrm.JonasPluginBase/
Samples from demo https://github.com/rappen/eXtreme365-2017-Plugin
CRM Ideas
Reset Plugin Type Statistics https://crmideas.dynamics.com/ideas/dynamics-crm/ID0001110
Define trace message block size https://crmideas.dynamics.com/ideas/dynamics-crm/ID0000599
Store milliseconds on traces https://crmideas.dynamics.com/ideas/dynamics-crm/ID0001056
Trace plugins not sandboxed https://crmideas.dynamics.com/ideas/dynamics-crm/ID0000942
Please vote 
Complete prior to the closing session to be included in the survey drawing!
LG TONE PLATINUM Wireless Stereo Headset
WEBSITE
Jonas Rapp, Innofactor
FILL OUT SURVEY THROUGH THE MOBILE APP
Thank you to our sponsors!

More Related Content

PDF
DevOps for Dynamics 365/CRM - Summit EMEA 2017 Amsterdam
PPTX
CRM Saturday - XrmToolBox with Jonas Rapp
PPTX
Cherry Picking XrmToolBox
PDF
Continuous Delivery for Dynamics 365/CRM
PDF
Essential SDK Tools for Dynamics 365/CRM DevOps Journey
PDF
Continuous Delivery with Dynamics CRM - extremeCRM 2014 Barcelona
PDF
Continuous Delivery with Dynamics CRM - CRMUG Webinar 2014
PDF
Silverlight & Microsoft CRM Development - extremeCRM Berlin 2012
DevOps for Dynamics 365/CRM - Summit EMEA 2017 Amsterdam
CRM Saturday - XrmToolBox with Jonas Rapp
Cherry Picking XrmToolBox
Continuous Delivery for Dynamics 365/CRM
Essential SDK Tools for Dynamics 365/CRM DevOps Journey
Continuous Delivery with Dynamics CRM - extremeCRM 2014 Barcelona
Continuous Delivery with Dynamics CRM - CRMUG Webinar 2014
Silverlight & Microsoft CRM Development - extremeCRM Berlin 2012

What's hot (20)

PPTX
Zero To DevOps - Source Control and Release Strategy for Dynamics 365 Solutio...
PPTX
Episode 12 - Basics of Trigger
PPTX
Automated Testing for Dynamics CRM 3 - CRMUG 2014
PDF
Continuous Integration for Dynamics 365/CRM
PDF
Testing CRM from a 360 View - extremeCRM Rome 2013
PDF
Automated Testing for Dynamics CRM 2 - CRMUG 2014
PDF
Test & Dynamics CRM - extremeCRM Berlin 2012
PPTX
Source Control and Release Strategy for Dynamics 365 Solutions
PPTX
Episode 20 - Trigger Frameworks in Salesforce
PPTX
Application Lifecycle Management with TFS
PPTX
Episode 13 - Advanced Apex Triggers
PPT
Team Foundation Server Demo
PDF
Automated Testing for Dynamics CRM 4 - CRMUG 2014
PDF
Tfs 2015 Upgrade Tips and Tricks
PPTX
Lap around ALM with Visual Studio and TFS 2013
PDF
Automated Testing for Dynamics CRM 1 - CRMUG 2014
PDF
An intuitive guide to combining free monad and free applicative
PPTX
Ordina SOFTC Presentation - Deployment with TFS Build and Workflow
PDF
Power apps for business applications
PDF
Release Management in TFS 2015
Zero To DevOps - Source Control and Release Strategy for Dynamics 365 Solutio...
Episode 12 - Basics of Trigger
Automated Testing for Dynamics CRM 3 - CRMUG 2014
Continuous Integration for Dynamics 365/CRM
Testing CRM from a 360 View - extremeCRM Rome 2013
Automated Testing for Dynamics CRM 2 - CRMUG 2014
Test & Dynamics CRM - extremeCRM Berlin 2012
Source Control and Release Strategy for Dynamics 365 Solutions
Episode 20 - Trigger Frameworks in Salesforce
Application Lifecycle Management with TFS
Episode 13 - Advanced Apex Triggers
Team Foundation Server Demo
Automated Testing for Dynamics CRM 4 - CRMUG 2014
Tfs 2015 Upgrade Tips and Tricks
Lap around ALM with Visual Studio and TFS 2013
Automated Testing for Dynamics CRM 1 - CRMUG 2014
An intuitive guide to combining free monad and free applicative
Ordina SOFTC Presentation - Deployment with TFS Build and Workflow
Power apps for business applications
Release Management in TFS 2015
Ad

Similar to eXtreme365 - Plugin Development for Analysis (20)

PDF
Course003 plugins chapters
PPTX
Plugin vs Workflow in Microsoft Dynamics CRM
PDF
Tips and Tricks for Using the Solution Packager
PPTX
Dyn crm2013 whatsnew_v1_0_cr
PPTX
Create Your Own CRM Roadmap
PDF
Technical Webinar: By the (Play) Book: The Agile Practice at OutSystems
PDF
Microsoft CRM xRM4Legal 2014 Introduction and Demonstration 0917
PDF
White Label Solutions for Digital Agencies | DevOut Labs.pdf
PDF
Salim Adamon: Dynamics CRM overview & architecture
PPT
Microsoft Dynamics CRM Enterprise SummitMAXF-CRM.ppt
PPTX
Improving the Traceability and Reliability of CRM Implementations with TFS
PDF
Zoho vs Sage vs MS-Dynamics
PPTX
Salesforce Continuous Integration with AutoRABIT
PPTX
Dynamics 365 introduction and functional
PPTX
Rapid Deployment of BMC Remedy Solutions 2006
PDF
Building out a Global Data delivery platform - the business and technical use...
PPTX
Agile an explanation by sedulous business solutions
PPTX
Radar: Integrate to Innovate: Continuous Delivery
PDF
Drive User Adoption And Productivity Using Crm Within Microsoft Outlook
Course003 plugins chapters
Plugin vs Workflow in Microsoft Dynamics CRM
Tips and Tricks for Using the Solution Packager
Dyn crm2013 whatsnew_v1_0_cr
Create Your Own CRM Roadmap
Technical Webinar: By the (Play) Book: The Agile Practice at OutSystems
Microsoft CRM xRM4Legal 2014 Introduction and Demonstration 0917
White Label Solutions for Digital Agencies | DevOut Labs.pdf
Salim Adamon: Dynamics CRM overview & architecture
Microsoft Dynamics CRM Enterprise SummitMAXF-CRM.ppt
Improving the Traceability and Reliability of CRM Implementations with TFS
Zoho vs Sage vs MS-Dynamics
Salesforce Continuous Integration with AutoRABIT
Dynamics 365 introduction and functional
Rapid Deployment of BMC Remedy Solutions 2006
Building out a Global Data delivery platform - the business and technical use...
Agile an explanation by sedulous business solutions
Radar: Integrate to Innovate: Continuous Delivery
Drive User Adoption And Productivity Using Crm Within Microsoft Outlook
Ad

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
A Presentation on Artificial Intelligence
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Approach and Philosophy of On baking technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Mushroom cultivation and it's methods.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
1. Introduction to Computer Programming.pptx
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
NewMind AI Weekly Chronicles - August'25-Week II
A Presentation on Artificial Intelligence
Network Security Unit 5.pdf for BCA BBA.
Encapsulation_ Review paper, used for researhc scholars
Unlocking AI with Model Context Protocol (MCP)
Spectral efficient network and resource selection model in 5G networks
Approach and Philosophy of On baking technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Programs and apps: productivity, graphics, security and other tools
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Mushroom cultivation and it's methods.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Assigned Numbers - 2025 - Bluetooth® Document
Digital-Transformation-Roadmap-for-Companies.pptx
A comparative analysis of optical character recognition models for extracting...
1. Introduction to Computer Programming.pptx
cloud_computing_Infrastucture_as_cloud_p
Group 1 Presentation -Planning and Decision Making .pptx

eXtreme365 - Plugin Development for Analysis

  • 1. Guidelines and examples to plugin development for continuous tracing and advanced analysis using XrmToolBox Jonas Innofactor Sweden Rapp Plugin development for analysis
  • 2. Jonas Rapp var jonas = (WhoAmIResponse)service.Execute(new WhoAmIRequest()); Head of Development, Innofactor SE Cinteros Developer Since 1994, Dynamics CRM since 2009 XrmToolBox contributor Since 2014 Speaker 2017: CRM Saturday, eXtreme365 MVP 2017 Twitter: @rappen Email: jonas.rapp@innofactor.com Blog: jonasrapp.innofactor.se
  • 3. Audience var audience = (WhoAreYouResponse)service.Execute(new WhoAreYouRequest()); Developers? C# Developers? XrmToolBox users? XrmToolBox contributors? CRM Debuggers? Plugin Trace Viewers?
  • 4. Background Living with the platform – or – Teaching a developer to love the handcuffs of Microsoft Dynamics CRM
  • 5. The Handcuffs of CRM From SW dev to MSDynCRM dev You are not in control Injecting our code Can’t take back control The black box is still black And it is getting darker in the cloud Have the box work for you Improve monitoring, pick up signals Hawking radiation emitted from a black hole Making the cuffs more comfortable
  • 6. The Handcuffs of CRM Create your radiation Write logs Throw correct exceptions Relevant messages try-catch for valid call stacks Add noop triggers for logging Injectable contrast Simplify development Supporting libraries Intialization of service etc Embed logging Deployment routines Upload of webresources Deployment of plugins Export / import solutions etc.
  • 7. Introduction Plugin investigation in Microsoft Dynamics 365
  • 8. Plugin investigation options Debugging Plugin Profiler Plugin Registration, record context and “replay” during debugging Attach to process Onprem only Mocking context Hard code mocked events, communication with CRM limited Analyzing OOTB Logging Server Trace file Plugin Trace Log Custom Logging File Event viewer, External service Custom entity
  • 9. Plugin investigation options Debugging Concept Try to reproduce bugs to monitor behavior Ad hoc mimicking – “watching quarks” Environment Dev/Test Access Plugin Registration Server process Analyzing Concept Look at actual recorded events Review history – “walk backwards” Environment Any Access Onprem server access Elevated user
  • 10. Plugin Analysis – Out of the Box Server Trace file Onprem only, requires server access Hard to see the forest through the trees Plugin Trace Log Sandboxed only OOTB UX discouraging
  • 11. Plugin Trace Log Plugin execution information Start time, Duration, Id, … Step and Context details Pipeline details Custom logging Initialize ITracingService Write logging information • Message Body • Exception Details Availability Settings – Plug-in Trace Log Exceptions • Sync plugins exceptions • Settings – System Jobs Introduced CRM 2011 – exceptions only • Plugins • Async jobs CRM 2015 U1 – Entity and UI
  • 12. Plugin Trace Log Activation System Setting • Off • Exceptions • All Written async After execution completed Considerations Always on? • Performance impact Recurring bulk delete job! • Default is provided Detail level • Message Block max 10k
  • 14. Custom Tools Making plugin investigation easier
  • 15. Plugin Trace Log – 3rd Party Help What Plugin Trace Viewer A tool in the “industry standard” XrmToolBox Alternative UI Presenting information from the Plugin Trace Log in a more appetizing way Purpose Empower the Plugin Trace Log Filtering Grouping Quick-view Empower YOU Make it easy to find relevant information from the log
  • 16. Plugin Trace Log – Base class What Plugin base class Implements IPlugin Encapsulates target entity, images, service, trace etc. Custom service class Implements IOrganizationService Writes log and timing to trace Purpose Make tracing seamless Code as you always code Get tracing for free Streamline development Focus on business logic, not repetitive common tasks
  • 17. Demo 2 Simple plugin using base class First glance at the Plugin Trace Viewer Context logging plugin
  • 18. Correlation A walk down memory lane
  • 19. Plugin Trace Log – Correlation Id What Guid related to plugin execution Maintained through entire pipeline Stored in each trace log record Available in IExecutionContext How do events correlate? Purpose CRM Core Used to prevent infinite loops Plugin Trace Viewer Follow execution chains Trace events triggering events Our breadcrumb trail in the forest
  • 20. Plugin Trace Viewer – Correlation Id How Identify log records with same Id Guids transposed to single letters No letter for single unique records Select all connected records Filter by correlation id(s) Purpose Our breadcrumb trail Cherry picking the trace log Connect the dots Originating from one (1) event
  • 21. Demo 3 Correlation Id Plugins triggering plugins Exception origins
  • 22. More analysis tools Aggregated lifetime stats Plugin Type Statistics Organization Insights
  • 23. Plugin Type Statistics Aggregated stats about plugins Execution count Failure count Average execution time Crash count and reasons Cannot be reset In CRM Advanced Find, like any entity In Plugin Trace Viewer Show Statistics panel
  • 24. Organization Insights Availability Preview Dashboard (being replaced) Marketplace Solution (replacing) Metrics about the instance Activity statistics Dimensions Operations (CRUD) Requests (Form, Report, Dashboard) Plugin (Executions, Failures) Entity User
  • 25. Organization Insights – Preview Dashboard
  • 29. Code JonasPluginBase project https://github.com/rappen/JonasPluginBase JonasPluginBase NuGet package https://www.nuget.org/packages/Rappen.Xrm.JonasPluginBase/ Samples from demo https://github.com/rappen/eXtreme365-2017-Plugin CRM Ideas Reset Plugin Type Statistics https://crmideas.dynamics.com/ideas/dynamics-crm/ID0001110 Define trace message block size https://crmideas.dynamics.com/ideas/dynamics-crm/ID0000599 Store milliseconds on traces https://crmideas.dynamics.com/ideas/dynamics-crm/ID0001056 Trace plugins not sandboxed https://crmideas.dynamics.com/ideas/dynamics-crm/ID0000942 Please vote 
  • 30. Complete prior to the closing session to be included in the survey drawing! LG TONE PLATINUM Wireless Stereo Headset WEBSITE Jonas Rapp, Innofactor FILL OUT SURVEY THROUGH THE MOBILE APP
  • 31. Thank you to our sponsors!

Editor's Notes