mastering intellitrace in development and production
DESCRIPTION
Talk from DevConnections 2014 on IntelliTrace.TRANSCRIPT
Mastering IntelliTrace in Development and
Production
#devconnections
SESSION TITLE
#devconnections
Sasha Goldshtein
CTO, Sela GroupMicrosoft C# MVP, Azure MRS@goldshtn blog.sashag.net
#devconnections
MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION
IntelliTrace®• Profiler-logger-debugger hybrid• “Historical Debugging”• Tracks events and method call
information at runtime• Records stack trace, local variables, and
custom information for each event• Records exceptions, SQL queries,
performance information for later review#devconnections
MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION
DEMOHistorical Debugging with IntelliTrace
#devconnections
MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION
What Exactly Is Collected?• Parameters• Return values• Reference type
local variables– For each
referenced object, whether or not it was there (but not its contents)
void ReadTweets(string account){ var tweets =
GetTweets(account); int count = 3; for (int i = 0; i < count; +
+i) DisplayTweet(tweets[i]);}
#devconnections
MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION
What Exactly Is Collected?• Interesting runtime
events– WCF, ASP.NET,
ADO.NET, file access, UI stuff, etc.
• You can customize with your own events!
#devconnections
MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION
What Exactly Is Collected?
• Performance alerts• Exceptions• SQL queries
#devconnections
MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION
IntelliTrace Overhead• Method-level information is costly (2-
10x slowdown not unheard of)• Events and performance alerts are
not as costly• You can configure IntelliTrace on
specific modules only for speedup#devconnections
MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION
Collecting IntelliTrace Logs• Visual Studio can save logs from every run• Stand-alone collector:– IntelliTraceSC.exe launch /cp:plan.xml app.exe
• PowerShell cmdlets for ASP.NET/SharePoint• Microsoft Monitoring Agent (MMA):– Microsoft Test Manager integration– Microsoft System Center integration– Stand-alone monitoring agent
#devconnections
MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION
DEMOCreating IntelliTrace Logs
#devconnections
MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION
IntelliTrace on Azure• The only practical
way to debug long-standing issues in cloud applications
• Works with all kinds of cloud services
#devconnections
MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION
DEMOCollecting IntelliTrace from Azure
#devconnections
MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION
Extending IntelliTrace Events
• Add your own events to CollectionPlan.xml
• IntelliTrace can generate an event from any method call in your code or framework code
#devconnections
MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION
Custom IntelliTrace Event<DiagnosticEventSpecification> <SettingsName _locID="...">Garbage collection</SettingsName> <Bindings> <Binding> <ModuleSpecificationId>mscorlib</ModuleSpecificationId> <TypeName>System.GC</TypeName> <MethodName>Collect</MethodName> <MethodId>System.GC.Collect(System.Int32):System.Void</MethodId> <ShortDescriptionGC induced</ShortDescription> <LongDescription>GC of gen {0}.</LongDescription> <DataQueries> <DataQuery index="0" type="Int32" query="" /> </DataQueries> </Binding> </Bindings></DiagnosticEventSpecification>
#devconnections
MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION
Summary• IntelliTrace is super-useful inside
Visual Studio while debugging• You can collect IntelliTrace data from
QA, cloud, and production• You can extend IntelliTrace with your
own events#devconnections
SESSION TITLE
#devconnections
Rate This Session Now!Rate with Mobile App:1. Select the session from the
Agenda or Speakers menus
2. Select the Actions tab
3. Click Rate Session
Rate Using Our Website:1. Register at www.devconnections.com/logintoratesession
2. Go to www.devconnections.com/ratesession
3. Select this session from the list and rate it
Tell Us What
You Thought
of This Session
Be Entered to
WIN
Prizes!