A method and apparatus for providing instrumentation data to an instrumentation
data source from within a managed code environment is provided. A decoupled provider
is provided that executes partially in managed code and partially in unmanaged
code. The decoupled provider facilitates communication with an instrumentation
data source. The decoupled provider also dynamically registers schema for managed
code objects to be instrumented at run-time. The decoupled provider also receives
and processes requests from the instrumentation data source to retrieve instance
data for managed code objects, to write properties on managed code objects, and
to execute methods on managed code objects.