mastering intellitrace in development and production

16
Mastering IntelliTrace in Development and Production #devconnections

Upload: sasha-goldshtein

Post on 16-Nov-2014

854 views

Category:

Technology


0 download

DESCRIPTION

Talk from DevConnections 2014 on IntelliTrace.

TRANSCRIPT

Page 1: Mastering IntelliTrace in Development and Production

Mastering IntelliTrace in Development and

Production

#devconnections

Page 2: Mastering IntelliTrace in Development and Production

SESSION TITLE

#devconnections

Sasha Goldshtein

CTO, Sela GroupMicrosoft C# MVP, Azure MRS@goldshtn blog.sashag.net

#devconnections

Page 3: Mastering IntelliTrace in Development and Production

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

Page 4: Mastering IntelliTrace in Development and Production

MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION

DEMOHistorical Debugging with IntelliTrace

#devconnections

Page 5: Mastering IntelliTrace in Development and Production

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

Page 6: Mastering IntelliTrace in Development and Production

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

Page 7: Mastering IntelliTrace in Development and Production

MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION

What Exactly Is Collected?

• Performance alerts• Exceptions• SQL queries

#devconnections

Page 8: Mastering IntelliTrace in Development and Production

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

Page 9: Mastering IntelliTrace in Development and Production

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

Page 10: Mastering IntelliTrace in Development and Production

MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION

DEMOCreating IntelliTrace Logs

#devconnections

Page 11: Mastering IntelliTrace in Development and Production

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

Page 12: Mastering IntelliTrace in Development and Production

MASTERING INTELLITRACE IN DEVELOPMENT AND PRODUCTION

DEMOCollecting IntelliTrace from Azure

#devconnections

Page 13: Mastering IntelliTrace in Development and Production

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

Page 14: Mastering IntelliTrace in Development and Production

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

Page 15: Mastering IntelliTrace in Development and Production

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

Page 16: Mastering IntelliTrace in Development and Production

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!