{"id":6253,"date":"2011-09-15T14:25:00","date_gmt":"2011-09-15T14:25:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2011\/09\/15\/modifying-an-intellitrace-collection-plan-for-the-stand-alone-collector\/"},"modified":"2022-07-27T05:26:11","modified_gmt":"2022-07-27T13:26:11","slug":"modifying-an-intellitrace-collection-plan-for-the-stand-alone-collector","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/modifying-an-intellitrace-collection-plan-for-the-stand-alone-collector\/","title":{"rendered":"Modifying an IntelliTrace Collection Plan for the Stand-Alone Collector"},"content":{"rendered":"<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">With the release of the CTP of Visual Studio vNext we are including the ability to collect IntelliTrace logs from web applications running in IIS 7.0 and 7.5 without requiring Visual Studio installed on the web server.<\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">Several demos exist of the stand-alone Intellitrace data collector including one by Cameron Skinner and Brian Keller at TechEd earlier this year and another by Tracey Trewin and Mark Groves at the \/\/BUILD\/ conference.\u00a0 Recordings of these sessions are available.<\/span><\/span><\/p>\n<h2><span style=\"font-size: medium\"><span style=\"color: #4f81bd\"><span style=\"font-family: Cambria\">What you get out of the box<\/span><\/span><\/span><\/h2>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\"><\/span><\/span>\u00a0<\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">The stand-alone Intellitrace data collector .cab \u00a0install file is available with the CTP release of Visual Studio.\u00a0 With a default installation the file is located at c:Program Files(x86)Microsoft Visual Studio 11.0Team ToolsTraceDebugger ToolsIntelliTraceCollection.cab<\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">Included with the cab are two collection plans, collection_plan.ASP.NET.trace.xml and collection_plan.ASP.NET.default.xml.\u00a0 The collection_plan.ASP.NET.default.xml\u00a0 collection plan equates to the default IntelliTrace setting in Visual Studio, including which events are enabled and which are not. The collection_plan.ASP.NET.trace.xml collection plan is the same as selecting \u201cIntelliTrace events and call information\u201d from the General tab of the IntelliTrace options in Visual Studio.<\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">The details of these settings are available on MSDN. For more information, see \u00a0<\/span><\/span><a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/hh398365(v=VS.110).aspx\">Collecting IntelliTrace Data By Using the Stand-Alone Collector<\/a>.<\/p>\n<h2><span style=\"font-size: medium\"><span style=\"color: #4f81bd\"><span style=\"font-family: Cambria\">Modifying the Collection Plan<\/span><\/span><\/span><\/h2>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">Just as you are likely to make modifications to the IntelliTrace settings in Visual Studio you may want to modify the collection settings when using the files from the cab.\u00a0 The easiest way to think of this is by looking at the options in Visual Studio and then making the equivalent change in the collection plan xml file that you wish to use with your application. <\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">Log file size is controlled by the MaximumLogFileSize as measured in 64kb blocks.\u00a0 The default is 4000 which equates to a 256MB log file.<\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">Each of the events listed in the Visual Studio options matches to a DiagnosticEventSpecification in the xml.\u00a0 For example the event \u201cProcess Request (IIS)\u201d<\/span><\/span><\/p>\n<p><img decoding=\"async\" border=\"0\" alt=\"\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2011\/09\/4721.IntellitraceCollectionProcessRequestOption.png\" \/><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">matches the DiagnosticEventSpecification as shown.<\/span><\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #993366\">\u00a0<DiagnosticEventSpecification><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<CategoryId><\/span>system.web<span style=\"color: #993366\"><\/CategoryId><\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #993366\">&lt;SettingsName\u00a0_locID<\/span>=&#8221;settingsName.HttpApplication.AssignContext&#8221;<span style=\"color: #993366\">><\/span>Process\u00a0Request\u00a0(IIS<span style=\"color: #993366\">)<\/SettingsName><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;SettingsDescription\u00a0_locID<\/span>=&#8221;settingsDescription.HttpApplication.AssignContext&#8221;<span style=\"color: #993366\">><\/span>Asynchronous\u00a0call\u00a0to\u00a0an\u00a0HTTP\u00a0handler\u00a0initialized.<span style=\"color: #993366\"><\/SettingsDescription><\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #993366\"><Bindings><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<Binding><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<ModuleSpecificationId><\/span>system.web<span style=\"color: #993366\"><\/ModuleSpecificationId><\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #993366\"><TypeName><\/span>System.Web.HttpApplication<span style=\"color: #993366\"><\/TypeName><\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #993366\"><MethodName><\/span>AssignContext<span style=\"color: #993366\"><\/MethodName><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<MethodId><\/span>System.Web.HttpApplication.AssignContext(System.Web.HttpContext):System.Void<span style=\"color: #993366\"><\/MethodId><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;ShortDescription\u00a0_locID<\/span>=&#8221;shortDescription.HttpApplication.AssignContext&#8221;>{0}\u00a0&#8220;{1}&#8221;<span style=\"color: #993366\"><\/ShortDescription><\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #993366\">&lt;LongDescription\u00a0_locID=&#8221;<\/span>longDescription.HttpApplication.AssignContext<span style=\"color: #993366\">&#8220;>Asynchronous\u00a0call\u00a0to\u00a0an\u00a0HTTP\u00a0handler\u00a0initialized.<\/LongDescription><\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #993366\"><DataQueries><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;DataQuery\u00a0index<\/span>=&#8221;1&#8243;\u00a0<span style=\"color: #993366\">maxSize<\/span>=&#8221;256&#8243;\u00a0<span style=\"color: #993366\">type<\/span>=&#8221;String&#8221;\u00a0<span style=\"color: #993366\">name<\/span>=&#8221;Request\u00a0HTTP\u00a0Method&#8221;\u00a0<span style=\"color: #993366\">_locID<\/span>=&#8221;dataquery.HttpApplication.AssignContext.RequestHTTPMethod&#8221;\u00a0<span style=\"color: #993366\">_locAttrData<\/span>=&#8221;name&#8221;\u00a0query=&#8221;&#95;request.&#95;httpMethod&#8221;<span style=\"color: #993366\">><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/DataQuery><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&lt;DataQuery\u00a0index<\/span>=&#8221;1&#8243;\u00a0<span style=\"color: #993366\">maxSize<\/span>=&#8221;256&#8243;\u00a0<span style=\"color: #993366\">type<\/span>=&#8221;String&#8221;\u00a0<span style=\"color: #993366\">name<\/span>=&#8221;Request\u00a0file\u00a0path&#8221;\u00a0_locID=&#8221;dataquery.HttpApplication.AssignContext.Requestfilepath&#8221;\u00a0<span style=\"color: #993366\">_locAttrData<\/span>=&#8221;name&#8221;\u00a0<span style=\"color: #993366\">query<\/span>=&#8221;&#95;request.&#95;clientFilePath._virtualPath&#8221;<span style=\"color: #993366\">><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/DataQuery><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/DataQueries><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/Binding><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/Bindings><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/DiagnosticEventSpecification><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">Ok, so that\u2019s a lot of XML behind a simple setting in Visual Studio.\u00a0 However if all you want to do is either turn it on or off (just like checking the checkbox in Visual Studio) all you need to do is work with a single xml attribute.\u00a0 For each DiagnosticEventSpecification there is a single attribute controling whether the event is collected.\u00a0 It is the \u201cenabled\u201d attribute on the DiagnosticEventSpecification element.\u00a0 But wait, you say, there is no such attribute on the DiagnosticEventSpecification element in the sample!\u00a0 True enough, if the attribute is omitted the default behavior is to collect that event.\u00a0 In the example above the following two DiagnosticEventSpecification elements would be considered equal.<\/span><\/span><\/p>\n<p><span style=\"color: #993366\"><DiagnosticEventSpecification><\/span><\/p>\n<p><span style=\"color: #993366\"><DiagnosticEventSpecification enabled=\"true\"><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">If you do not want to collect a specific event you can disable it by setting the enabled attribute to false like this:<\/span><\/span><\/p>\n<p><span style=\"color: #993366\"><DiagnosticEventSpecification enabled=\"false\"><\/span><\/p>\n<p><span style=\"font-size: small\"><em><b>Note:<\/b><\/em><em> To collect any events at all you must also ensure that the DiagnosticEventInstrumentation element has the attribute \u201cenabled\u201d set to true.\u00a0 You can think of this element is the master control for all of the events and determines whether they are collected or not regardless of the enabled setting on any individual DiagnosticEventSpecification.<\/em><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">If you compare the two collection plans that are provided with the cab file you will see that the only difference between the two of them is element that controls the difference between Events Only collection and Events and Call Information.\u00a0 The element is<\/span><\/span><\/p>\n<p><span style=\"color: #993366\"><TraceInstrumentation enabled=\"false\"><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">Setting the enabled attribute to true on the TraceInstumentation element enables the collection of call information.<\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">As you can see the enabled attribute is used to control much of the collection capabilities of IntelliTrace.<\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">The next section to look at is the ModuleList found nested within the TraceInstrumentation element.<\/span><\/span><\/p>\n<p>\u00a0\u00a0\u00a0 <span style=\"color: #993366\"><ModuleList isExclusionList<\/span>=&#8221;true&#8221;<span style=\"color: #993366\">><\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: #993366\"><Name><\/span>PublicKeyToken:B77A5C561934E089<span style=\"color: #993366\"><\/Name><\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: #993366\"><Name><\/span>PublicKeyToken:B03F5F7F11D50A3A<span style=\"color: #993366\"><\/Name><\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0<span style=\"color: #993366\"><Name><\/span>PublicKeyToken:31BF3856AD364E35<span style=\"color: #993366\"><\/Name><\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: #993366\"><Name><\/span>PublicKeyToken:89845DCD8080CC91<span style=\"color: #993366\"><\/Name><\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: #993366\"><Name><\/span>PublicKeyToken:71E9BCE111E9429C<span style=\"color: #993366\"><\/Name><\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: #993366\"><Name><\/span>Microsoft<span style=\"color: #993366\">.<\/Name><\/span><\/p>\n<p>\u00a0\u00a0\u00a0 <span style=\"color: #993366\"><\/ModuleList><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">This section maps to the Modules section of the options in Visual Studio. The isExclusionList attribute maps to the selection between \u201cCollect data from all modules except for the following\u201d option and the \u201cCollect data from only the following modules\u201d option.\u00a0 It is important to note that this only applies to the collection of call data and does not apply to the IntelliTrace events.<\/span><\/span><\/p>\n<p><span style=\"font-family: Calibri;font-size: small\">\u00a0<\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">The default behavior is to use a \u201cblack list\u201d approach in which the listed modules are excluded from call data instrumentation.\u00a0 The public key that are listed represent Microsoft keys.\u00a0 Therefore the list will generally not instrument any of the Microsoft modules that may contribute to your application.<\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">Often it may be advantageous to only instrument specific modules by using a \u201cwhite list\u201d approach in which the specific modules are listed explicitly.\u00a0 This will keep call information collection more focused on just the modules of interest.\u00a0 This is also an easier way to eliminate third party modules that may be consumed by your application.\u00a0 To target only the modules that represent the Fabrikam code for an application the module list might look like the following:<\/span><\/span><\/p>\n<p>\u00a0\u00a0\u00a0<span style=\"color: #993366\"> <ModuleList isExclusionList<\/span>=&#8221;false&#8221;<span style=\"color: #993366\">><\/span><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: #993366\"><Name><\/span>Fabrikam.<span style=\"color: #993366\"><\/Name><\/span><\/p>\n<p><span style=\"color: #993366\">\u00a0\u00a0\u00a0 <\/ModuleList><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-family: Calibri\">Using this configuration will eliminate any module that does not have the string \u201cFabrikam.\u201d in the module file name.\u00a0 This will keep collection of call information tightly scoped to only the modules of interest which will improve collection performance when including call data.<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>With the release of the CTP of Visual Studio vNext we are including the ability to collect IntelliTrace logs from web applications running in IIS 7.0 and 7.5 without requiring Visual Studio installed on the web server. Several demos exist of the stand-alone Intellitrace data collector including one by Cameron Skinner and Brian Keller at [&hellip;]<\/p>\n","protected":false},"author":124,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[226,1,225],"tags":[],"class_list":["post-6253","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ci","category-devops","category-git"],"acf":[],"blog_post_summary":"<p>With the release of the CTP of Visual Studio vNext we are including the ability to collect IntelliTrace logs from web applications running in IIS 7.0 and 7.5 without requiring Visual Studio installed on the web server. Several demos exist of the stand-alone Intellitrace data collector including one by Cameron Skinner and Brian Keller at [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/6253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/124"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=6253"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/6253\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=6253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=6253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=6253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}