Some answers...
1. Not that I know of.
2. You run installutil on the instrumented assembly (e.g.
MyInstrumentedApp.exe). More precisely you run installutil on the assembly
that contains M.EI.ProjectInstaller. That is the assembly containing the
code (that you added) that looks something like:
using System;
using System.ComponentModel;
using Microsoft.EnterpriseInstrumentation;
using Microsoft.EnterpriseInstrumentation.Schema;
[RunInstaller(true)]
public class MyProjectInstaller : ProjectInstaller {}
You can use a pre-generated config file with some caveats. See 1) below.
Here's a bigger explaination of all the EIF installers from the thread
in this newsgroup "EIF - InstallUtil what exactly does it do?"
-----------
There's actually three installutils in EIF:
1) installutil-ing the instrumented app
2) installutil-ing the schema dll.
3) some installutil-ing goes on when you first install EIF.
1) installutil-ing the instrumented app
---------------------------------------------------
Yes, you can hand craft the EI.config file and not perform the installutil
on the instrumented application. The only action missing would be the
registration of the EventSources in the Windows Event Log (specifically no
calls to System.Diagnostics.EventLog.CreateEventSource() are made).
It should be noted that the LogEventSink will automatically call
EventLog.CreateEventSource() if needed when the instrumented application is
executed. The only problem is that sometimes apps (e.g. ASP.NET Web Apps)
dont have sufficient permissions to make this call. In this case, the
logEventSink fails to load for this EventSource, an error is output the
Windows Event Log (notifiying of the error) and events that would have been
output to the logEventSink are dropped.
2) installutil-ing the schema dll.
---------------------------------------------------
This second one performs the following actions:
a) checks that all the event Types are of valid structure (e.g. EIF doesnt
allow self reference cycles - such as a typical node in a linked list
structure)
b) delegates through to WMI.NET's
System.Management.Instrumentation.ManagementInstaller - This Installer
registers the structure of the events in WMI's CIM Repoisitory and allows
the events to be output through WMI.NET
3) some installutil-ing goes on when you install EIF.
---------------------------------------------------
I wont go into much detail here, but a quick summary:
a) The perf counter categories and counter names are setup.
b) The Windows Trace Session Manager (TSM) service is installed.
c) The TraceRequestStart/EndEvent (or something like that name) are
registered with WMI's repository.
Cheers
Mike
--------------------

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Hi Mike,
Thanks for your replies. Based on your replies, I tried out the same
with Biztalk 2004. In case, you want the sample, just let me know, I
would be glad to share the same :)
In Biztalk (2004), I created an orchestration and added references to
MS.EI.Schema and MS.EI. And, in an expression box in the orchestration,
I typed in MS.EI.Schema.ErrorMessageEvent.Raise("My first error event.",
1, "CODE");
I ran this, and found that EIF was expecting the
EnterpriseInstrumentation.config file in "C:\Program Files\Microsoft
Biztalk 2004" folder. So, I used the config file that I had generated
with SimpleInstrumentation sample and put in the above folder. Within 2
seconds, I had my event in the event log. Success!
Now few more questions based on the above experience.
1. This might be Biztalk related. How would I be able to run Installutil
on my Biztalk Orchestration if Biztalk doesn't allow me to create an
instance of a class based on ProjectInstaller? I believe that this
question assumes importance when we have Custom Event sinks, am I
right?( I am trusting that you would be able to pose this and the next
question to the Biztalk team internally at MS and get a response, since
it would be tougher for me to explain EIF in the Biztalk 2004 newsgroup! )
2. Why does Biztalk orchestration expect the
EnterpriseInstrumentation.config file in "C:\Program Files\Microsoft
Biztalk 2004" unlike other projects which pick it up from the same
folder as the Instrumented Assembly?
3. How would I use EIF to Instrument my ASP (not ASP.NET) applications ?
Do I use Interop or are there any other means available?
Thanks and regards,
Vinil
> Some answers...
>
[quoted text clipped - 75 lines]
> | Thanks and regards,
> | Vinil
Mike Hayton [MS] - 28 Jul 2004 02:34 GMT
Sorry about the long delay in replying to this.
To answer your questions (as well as I can):
1. You dont neccessarily need a ProjectInstaller - its mainly used to
create the initial EI.config file.
I'll put a snippet out of another thread at the bottom of this reply that
explains more about the installers in EIF.
2. EIF is looking in the current working directory of the running process.
I expect that the BizTalk process is picking up your orchestration and
executing it with a current working directory of "C:\Program
Files\Microsoft Biztalk 2004". If you can figure out what process is
actually running your orchestration you can put an entry into its .config
file to tell EIF to look in another directory. See the topic "Selecting
Configuration File Location" in the EIF help (i.e.
EnterpriseInstrumentation.chm)
3. I guess you'd have to use interop but I really dont know if it will work
or not. Methinks probably not.
Hope this helps
Mike
==============================
Here's a bigger explaination of all the EIF installers from the thread
in this newsgroup "EIF - InstallUtil what exactly does it do?"
-----------
There's actually three installutils in EIF:
1) installutil-ing the instrumented app
2) installutil-ing the schema dll.
3) some installutil-ing goes on when you first install EIF.
1) installutil-ing the instrumented app
---------------------------------------------------
Yes, you can hand craft the EI.config file and not perform the installutil
on the instrumented application. The only action missing would be the
registration of the EventSources in the Windows Event Log (specifically no
calls to System.Diagnostics.EventLog.CreateEventSource() are made).
It should be noted that the LogEventSink will automatically call
EventLog.CreateEventSource() if needed when the instrumented application is
executed. The only problem is that sometimes apps (e.g. ASP.NET Web Apps)
dont have sufficient permissions to make this call. In this case, the
logEventSink fails to load for this EventSource, an error is output the
Windows Event Log (notifiying of the error) and events that would have been
output to the logEventSink are dropped.
2) installutil-ing the schema dll.
---------------------------------------------------
This second one performs the following actions:
a) checks that all the event Types are of valid structure (e.g. EIF doesnt
allow self reference cycles - such as a typical node in a linked list
structure)
b) delegates through to WMI.NET's
System.Management.Instrumentation.ManagementInstaller - This Installer
registers the structure of the events in WMI's CIM Repoisitory and allows
the events to be output through WMI.NET
3) some installutil-ing goes on when you install EIF.
---------------------------------------------------
I wont go into much detail here, but a quick summary:
a) The perf counter categories and counter names are setup.
b) The Windows Trace Session Manager (TSM) service is installed.
c) The TraceRequestStart/EndEvent (or something like that name) are
registered with WMI's repository.
--------------------
| Hi Mike,
| Thanks for your replies. Based on your replies, I tried out the same
[quoted text clipped - 110 lines]
| > | Thanks and regards,
| > | Vinil

Signature
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm