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 Version reports as '.NET vnull' #93

Closed
hotchkj opened this issue Aug 14, 2020 · 0 comments · Fixed by #95
Closed

NET Version reports as '.NET vnull' #93

hotchkj opened this issue Aug 14, 2020 · 0 comments · Fixed by #95

Comments

@hotchkj
Copy link

hotchkj commented Aug 14, 2020

Our reports are showing as reported platform version .NET vnull

Requested Info Value
Tested library version v0.8.0.362
Runtime NET Framework 4.8
Assembly target NET Standard 2.0

The current NET Standard 2.0 code is looking for a custom attribute

return Assembly.GetEntryAssembly()?.GetCustomAttribute<TargetFrameworkAttribute>()?.FrameworkName;

According to Microsoft, the recommended way in NET Standard 2.0 to get the platform is RuntimeInformation.FrameworkDescription

If I override the tag:

.WithTags(new Dictionary<string, object>
{
	{LightStepConstants.ComponentNameKey, "mycomponent"},
	{LightStepConstants.TracerPlatformVersionKey, RuntimeInformation.FrameworkDescription}
});

I get reported .NET v.NET Framework 4.8.4200.0. It may be beneficial to adjust the version reporting to drop the .NET v prefix for this case as it appears MS do this for you in this case.

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

Successfully merging a pull request may close this issue.

1 participant