open-telemetry / opentelemetry-dotnet-instrumentation

OpenTelemetry .NET Automatic Instrumentation
https://opentelemetry.io
Apache License 2.0
353 stars 90 forks source link

Using Auto NuGet package with IIS .NET FX Application #3365

Open RassK opened 3 months ago

RassK commented 3 months ago

What

When user has multiple IIS apps and one or many of them have dependency conflicts, then it's advised to use OpenTelemetry.AutoInstrumentation NuGet package. There is no way to use the shipped startup script and IIS defines variables for external installation.

Proposal

Add PowerShell function (Similarly #3161) to convert a single app pool to use a NuGet package provided auto instrumentation. This should overwrite all of the primary envs with a proper locations.

Related

3085

nrcventura commented 3 months ago

Is this for multiple apps in a single app pool, or is this for multiple apps on the same host but different processes?

RassK commented 3 months ago

Multiple apps in IIS and different processes. If they are in the same app pool, then there is probably not much we can do any more, I don't know any more specific scope that could be used to fix that case.

nrcventura commented 3 months ago

The nuget package approach that you are recommending for multiple apps not in the same app pool should work. I'm not sure how to solve the problem when there are multiple apps with conflicts in the same app pool. They might all need the same version installed by the nuget package.

RassK commented 3 months ago

They might all need the same version installed by the nuget package.

That should work, one app has to share binaries for others... this cross loading pattern seems quite weird although 🤔

RassK commented 3 months ago

Synced with @pjanotti . Seems I did not properly understand that .NET FX apps must use also newer SDK style projects to leverage the Auto NuGet package. I don't know if it's possible to create such fx webapplication that supports the NuGet. I think it should be rephased that this task is more about IIS and Net Core Apps ❓