OpenTelemetry .NET and .NET Standard #3767
Locked
alanwest
announced in
Announcements
Replies: 1 comment 5 replies
-
Not true, metrics is broken on 3.1. See #4204 |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
OpenTelemetry .NET and .NET Standard
The OpenTelemetry .NET project depends heavily on APIs provided by .NET. Specifically, the APIs provided under
System.Diagnostics.DiagnosticSource
.With the release of .NET 6, it was announced that the .NET team will drop out-of-support frameworks for a number of packages including
System.Diagnostics.DiagnosticSource
. This practice will continue with the release of .NET 7. Frameworks no longer supported will include .NET Core 3.1 and .NET 5. Refer to the .NET download page to view the end of support dates for each version of .NET.The core packages offered by OpenTelemetry .NET currently ship a .NET Standard build (i.e.,
netstandard2.0
and/ornetstandard2.1
). However, referencing the latest version of OpenTelemetry .NET by an application targeting .NET Core 3.1 or .NET 5 will generate the following build warnings:These warnings can be suppressed by setting the
SuppressTfmSupportBuildWarnings
MSBuild property..NET Standard builds of OpenTelemetry .NET
OpenTelemetry .NET will continue to ship .NET Standard targets of its packages (i.e.,
netstandard2.0
and/ornetstandard2.1
).Implementation specific target frameworks (e.g.,
net8.0
,net471
) may continue to be added or removed as necessary. Removal of implementation specific target frameworks will always be announced and may occur in minor version releases. For example, in the recent past we removednet461
,netcoreapp3.1
, andnet5.0
targets.FAQs
What does support for .NET Standard mean for OpenTelemetry .NET?
We do not declare universal support for .NET Standard because OpenTelemetry .NET is not tested against out-of-support frameworks. Our official support will always be stated in terms of implementation specific target frameworks of .NET (see: https://github.com/open-telemetry/opentelemetry-dotnet#supported-net-versions).
OpenTelemetry .NET can technically be referenced by projects targeting out-of-support frameworks like .NET Core 3.1 and even as far back as .NET Core 2.0. However, there is no guarantee that it will continue to function.
How does the removal of implementation specific frameworks impact older applications?
Removing implementation specific frameworks may cause older applications to fallback to a .NET Standard build.
For example, if you have an application that targets
net6.0
and you reference the most current version of OpenTelemetry .NET (as of today that is 1.4.0), then you will receive anet6.0
targeted build of OpenTelemetry. In a future version after .NET 8 is released, for example, we may remove thenet6.0
target and replace it with anet8.0
target.You will still be able to upgrade to this later version of OpenTelemetry .NET from your
net6.0
targeted application, however at this point you'll receive anetstandard2.x
target of OpenTelemetry .NET. Furthermore, you may begin to receive build warnings indicating that your target framework is no longer supported bySystem.Diagnostics.DiagnosticSource
.This can come with some consequences like missing out on performance enhancements or features that were previously available in the old
net6.0
target of OpenTelemetry .NET. We will not intentionally break older applications that fallback to a .NET Standard build, but we cannot make any guarantees.Are other implementations of .NET support (e.g., Xamarin or Mono)?
Implementations such as Xamarin and Mono implement
netstandard2.0
. However, it has not been confirmed that OpenTelemetry .NET support these implementations despite currently offering anetstandard2.0
build (see: #3763).If in the future OpenTelemetry .NET declares official support for frameworks like Xamarin or Mono, we may do so either via the
nestandard2.0
build or implementation specific builds (e.g.,xamarin.android
,net6.0-android
, etc).Beta Was this translation helpful? Give feedback.
All reactions