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

Metrics don't work on .NET Core 3.1 #4204

Closed
dpk83 opened this issue Feb 17, 2023 · 8 comments
Closed

Metrics don't work on .NET Core 3.1 #4204

dpk83 opened this issue Feb 17, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@dpk83
Copy link

dpk83 commented Feb 17, 2023

Bug Report

Metrics don't work on .NET Core 3.1 with latest OpenTelemetry RC builds
Version: 1.4.0-rc.4

Runtime version (e.g. netcoreapp3.1

Symptom

Using OpenTelemetry SDK to record metrics throws exception
image

image

What is the expected behavior?
This document #3767 mentions that it can technically be consumed on Net core 3.1 but that's not true.
image

What did you expect to see?
We still a bunch of services which are on 3.1 and the plan to upgrade to NET6 and higher is still an year away due to various factors. We expected OpenTelemetry to support 3.1 for one more year.

What is the actual behavior?
It completely breaks on 3.1

Reproduce

Repro is straightforward, just create a self-contained project to emit metrics running on .NET core 3.1

We will close this issue if:

  • The repro project you share with us is complex. We can't investigate custom
    projects, so don't point us to such, please.
  • If we can not reproduce the behavior you're reporting.

Additional Context

Add any other context about the problem here.

@dpk83 dpk83 added the bug Something isn't working label Feb 17, 2023
@reyang
Copy link
Member

reyang commented Feb 17, 2023

I don't think OpenTelemetry should continue to support .NET Core 3.1 since that's a deprecated version of runtime which will not even receive security hotfix. https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core

The supported runtime versions and the strategy is clearly captured here https://github.com/open-telemetry/opentelemetry-dotnet#supported-net-versions.

@dpk83
Copy link
Author

dpk83 commented Feb 17, 2023

The document/annoucement then should be updated clearly to reflect the same. Currently it has wrong information

OpenTelemetry .NET can technically be consumed by projects targeting out-of-support frameworks like .NET Core 3.1 and even as far back as .NET Core 2.0.

@reyang
Copy link
Member

reyang commented Feb 17, 2023

I agree that the document should be clear. Where is the document?

@dpk83
Copy link
Author

dpk83 commented Feb 17, 2023

#3767

@alanwest
Copy link
Member

We still do not plan to support .NET Core 3.1. We do not run tests against any out-of-support frameworks.

I agree that the document should be clear. Where is the document?

We will update the document to make this more clear.

@GeoK
Copy link

GeoK commented Mar 22, 2023

@alanwest @reyang What is the recommendation for library authors who ship multi-target SDKs (including netstandard2.0)?
Is there a way to ensure that metrics would get recorded in case that developers are using netcoreapp3.1?

@cijothomas
Copy link
Member

@GeoK Not sure how is this any different for library authors who ship multi-target sdks.... If your app is ultimately run on unsupported .NET runtime, then Otel will not work.

@cijothomas
Copy link
Member

Is there a way to ensure that metrics would get recorded in case that developers are using netcoreapp3.1?

No, we dont test in .NET Core 3.1, and this issue already proves we dont work in .NET Core 3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants