microsoft / CLRInstrumentationEngine

The CLR Instrumentation Engine is a cooperation profiler that allows running multiple profiling extensions in the same process.
Other
94 stars 48 forks source link

Cooperative Distribution Model Requirements #37

Open WilliamXieMSFT opened 5 years ago

WilliamXieMSFT commented 5 years ago

Overview

The CLR Instrumentation Engine's main purpose is to provide cooperation among profilers running in the same environment. This requires various users to cooperatively ensure that the latest version of the Engine can be detected and loaded into the process.

To achieve this goal, we are asking each partner team to participate and provide their needs and requirements for their scenarios. Once we have enough information, we can discuss distribution solutions that can hopefully meet everyone's needs.

Distribution Steps

The distribution story for the Engine can be described through a series of steps.

  1. Detect if the Instrumentation Engine is installed.
  2. Detect if the Instrumentation Engine is configured.
  3. Install the Instrumentation Engine.
  4. Configure/activate the Instrumentation Engine.

Requirements

These are the currently identified requirements we expect for the Engine distribution. Please let us know if you have feedback or conflicts with these requirements and reply with your responses to these questions about your product.

Questions

Possible Solutions

There may be multiple solutions, but the two options we have considered internally are:

  1. MSI and/or a MergedModule for Windows platform

Each partner team has mentioned using an MSI for Windows to install their product. MSI has the benefit of supporting the above requirements.

If we go this route, there are several implementation details to consider:

  1. Installation Scripts

There are several options for scripting languages, including Python, Bash, and PowerShell which allow for cross platform support and customizable control over installation. This also allows for use of various packaging frameworks such as NuGet or distro-specific options like apk, deb files. Several concerns about this option:

WilliamXieMSFT commented 5 years ago

Visual Studio Snapshot Debugger

We target ASP.NET (Desktop & Core) applications across several Azure platforms.

Windows

Linux

SergeyKanzhelev commented 5 years ago

Does this issue covers adding instrumentation methods? Let's say one identified that Instrumentation Engine installed - how to add and remove new action safely?

From Application Insights - the big requirement is to be able to detect that Instrumentation Engine was enabled and check it's version from inside the process by SDK. Currently it's implemented by replacing the body of any method called Microsoft.Diagnostics.Instrumentation.Extensions.Base.NativeMethods.IsAttached and Microsoft.Diagnostics.Instrumentation.Extensions.Base.NativeMethods.GetAgentVersion

https://github.com/Microsoft/CLRInstrumentationEngine/blob/0807cc84afec64f95b7fc5350331f1f8c7759efc/src/Extensions.BaseLib/HostExtensionBase.cpp#L108-L130

DanFiedler commented 5 years ago

Contrast Security .NET Agent

We primarily target ASP.NET web applications across several different hosting environments. We currently support:

Windows (IIS and IIS-Express)

Azure App Service

.NET Core

Future

In the next few months, we will be adding support for:

lucaspimentel commented 5 years ago

Datadog - .NET Tracer for APM (repo | docs)

Installation technologies:

Installation is expected to run with admin privileges (i.e. able to install into %ProgramFiles%). Installation into non-admin accessible folder is not required.

Minimum requirements are mostly the same as for .NET Core 2.1, minus Windows Server Nano.

Framework requirements:

Supported application types:

Activation:

Future:

edit: links to repo and docs in header

bobuva commented 5 years ago

ShiftLeft .NET Microagent

Installation

Requirements

Application Environments

Activation

WilliamXieMSFT commented 5 years ago

Thank you everyone for providing your responses, and I apologize for the long delay; this month I was finally able to reprioritize my work on the Instrumentation Engine and provide some updates.

To aid in distribution on Windows, we plan to ship MSI and MSM packages of the engine. This should align with everyone's current distribution; you can either install the MSI directly via script or user instruction, incorporate the MSI in an MSI bundle with your existing installer, or consume the MSM module package into your MSI. The MSM and MSI share the same components so they will not conflict with each other.

In addition, I will be providing a roadmap and track our upcoming work on this repo to provide you transparency into this process. As always, feel free to provide feedback on here or reach out to us directly via email at clrieowners@microsoft.com.

Thanks! William

bobuva commented 5 years ago

Thanks William!

WilliamXieMSFT commented 5 years ago

Reopening issue to allow individuals to post new feedback/requirements