Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET Framework dependency issue #4126

Open
jcfarsight opened this issue Jan 31, 2023 · 9 comments
Open

.NET Framework dependency issue #4126

jcfarsight opened this issue Jan 31, 2023 · 9 comments
Labels
question Further information is requested

Comments

@jcfarsight
Copy link

I've been experimenting with including OpenTelemetry 1.3.2 in a .NET Framework solution and have run into a problem that others may encounter if they haven't already. It's worth noting that I'm hosting an ASP.NET Core web service (referencing the required Core DLLs) inside a .NET Framework solution.

The minimum version of dependency Microsoft.Extensions.Logging.Configuration is 3.1 (changed in PR 3196) however .NET Core 3.1 is no longer supported as of December 2022. Upgrading this to version 5.0+ is not an option in my case in .NET Framework as the InplaceStringBuilder class in dependency Microsoft.Extensions.Primitives has been removed, and this is required in some ASP.NET libraries (Microsoft.Net.Http.Headers as an example)

ASP.NET Core 2.1 libraries in .NET Framework follow the support period of the Framework itself, unlike 3.1 which does not. (https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core)

I appreciate that it made sense to bump the minimum version to 3.1 for the .NET Core target, but not for the .NET Framework target. Was this use case considered when the decision was made? Until I can migrate the solution to Core it looks like I either need to reference an unsupported version of the library or find an alternative solution.

@cijothomas
Copy link
Member

Pinging other issues which are duplicate of this: #4301 #4335

As of today, asp.net core apps targeting .NET Framework are not supported. Two options (I think)

  1. Call this lack of support explicitly (just like .NET Framework 3.5 is explicitly listed as not supported)
  2. Bring back support for this. This might require conditionally adjusting dependencies to allow 2.1

@dpk83
Copy link

dpk83 commented Mar 27, 2023

Pinging other issues which are duplicate of this: #4301 #4335

As of today, asp.net core apps targeting .NET Framework are not supported. Two options (I think)

  1. Call this lack of support explicitly (just like .NET Framework 3.5 is explicitly listed as not supported)
  2. Bring back support for this. This might require conditionally adjusting dependencies to allow 2.1

I know option 2 is additional effort but it will ease the pain for so many customers and at the same time open up the path for broader adoption of OpenTelemetry, so I will vote for #2

@cijothomas
Copy link
Member

Pasting a screenshot from the section from this doc which makes this an officially supported scenario : https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core#servicing
image

@rymeskar
Copy link

+1 .NET Framework is absolutely a supported scenario on ASP.NET Core, albeit a legacy one.

The current approach of OTEL M.Extensions.* versioning is causing us issues internally. @spashaieva will reach out offline with some more details.

@tarekgh
Copy link
Contributor

tarekgh commented Mar 30, 2023

CC @danmoseley

@julealgon
Copy link

@cijothomas what's the latest on this?

We've been using OpenTelemetry.Instrumentation.AspNetCore v1.0.0-rc9.5 for a while now in a couple of our NET472 AspNetCore projects, as any versions after that seemed to completely break support for tracing and we'd get a ton of orphaned and "empty" spans.

Our team now noticed that the standard OTEL http.server.request.duration metric is also missing for those 2 projects.

We are in a position currently where upgrading to .NET Core 3.1+ is fairly challenging due to some dependencies we still have on full framework-only libraries. While we do have a plan for this migration, we'd like for the instrumentation to work in the meantime.

The way this problem is described in #5019 seems quite easy to overcome in the instrumentation by special-casing the way some arguments are treated, but it was closed as duplicate of this one which is still open.

Is the team going to make OTEL officially unsupported in NET Framework AspNetCore?

This AspNetCore instrumentation is the only one giving us trouble right now. We have latest Http, Sql, EFCore, Runtime, Wcf and AspNet (System.Web) ones working just fine ATM using their latest versions.

@cijothomas
Copy link
Member

Is the team going to make OTEL officially unsupported in NET Framework AspNetCore?

This is already unsupported. By "officially" unsupported, did you mean to update https://github.com/open-telemetry/opentelemetry-dotnet?tab=readme-ov-file#supported-net-versions to call it out explicitly? Just like .NET Framework 3.5 is called out?

@julealgon
Copy link

Is the team going to make OTEL officially unsupported in NET Framework AspNetCore?

This is already unsupported. By "officially" unsupported, did you mean to update https://github.com/open-telemetry/opentelemetry-dotnet?tab=readme-ov-file#supported-net-versions to call it out explicitly? Just like .NET Framework 3.5 is called out?

Well considering its just the AspNetCore instrumentation that doesn't work properly (unless I'm unaware of other issues, if so, please let me know), maybe just make this explicit in the readme for that package.

@cijothomas
Copy link
Member

Is the team going to make OTEL officially unsupported in NET Framework AspNetCore?

This is already unsupported. By "officially" unsupported, did you mean to update https://github.com/open-telemetry/opentelemetry-dotnet?tab=readme-ov-file#supported-net-versions to call it out explicitly? Just like .NET Framework 3.5 is called out?

Well considering its just the AspNetCore instrumentation that doesn't work properly (unless I'm unaware of other issues, if so, please let me know), maybe just make this explicit in the readme for that package.

We don't know if there are other issues. There is no CI tests for ASP.NET .NET Framework apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants