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

Add Diagnostic Logging for Runtime Store Assembly Version Validation #3187

Merged
merged 14 commits into from
Jan 12, 2024

Conversation

rajkumar-rangaraj
Copy link
Contributor

@rajkumar-rangaraj rajkumar-rangaraj commented Dec 14, 2023

Why

Addresses part of #3168, #3075 by adding logging about an issue.

Adding the below package reference to Examples.AspNetCoreMvc project for net6.0 target it will recreate crash issue.

<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />

What

This rule logs diagnostic messages about the assembly versions in the runtime store compared to the application's assembly versions. It is designed to inform rather than enforce, ensuring that any potential versioning issues are noted without affecting the runtime behavior of the application.

Example:

[2024-01-05T20:39:28.2247519Z] [Warning] Rule Engine: Application has direct or indirect reference to lower version of runtime store assembly C:\repo\opentelemetry-dotnet-instrumentation\bin\tracer-home\store\x64\net6.0\microsoft.extensions.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.dll - 6.0.322.12309.  
[2024-01-05T20:39:28.3405484Z] [Debug] Rule Engine: Runtime store assembly C:\repo\opentelemetry-dotnet-instrumentation\bin\tracer-home\store\x64\net6.0\microsoft.extensions.configuration.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.Abstractions.dll is validated successfully. 
[2024-01-05T20:39:28.4660596Z] [Debug] Rule Engine: Runtime store assembly C:\repo\opentelemetry-dotnet-instrumentation\bin\tracer-home\store\x64\net6.0\microsoft.extensions.configuration.binder\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.Binder.dll is validated successfully. 

Tests

Checklist

  • [ ] CHANGELOG.md is updated.
  • [ ] Documentation is updated.
  • [ ] New features are covered by tests.

@rajkumar-rangaraj rajkumar-rangaraj requested a review from a team December 14, 2023 00:42
@rajkumar-rangaraj
Copy link
Contributor Author

We may need to hold on to this PR till 1.7 release. All the test apps that uses OpenTelemetry SDK fails.

[2023-12-14T01:53:33.6364129Z] [Error] Rule Engine: Application has direct or indirect reference to lower version of runtime store assembly \opentelemetry-dotnet-instrumentation\bin\tracer-home\store\x64\net8.0\microsoft.extensions.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.dll - 3.100.19.56504.
[2023-12-14T01:53:33.7062520Z] [Error] Rule Engine: Application has direct or indirect reference to lower version of runtime store assembly \opentelemetry-dotnet-instrumentation\bin\tracer-home\store\x64\net8.0\microsoft.extensions.configuration.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.Abstractions.dll - 3.100.19.56504.
[2023-12-14T01:53:33.8448724Z] [Error] Rule Engine: Application has direct or indirect reference to lower version of runtime store assembly \opentelemetry-dotnet-instrumentation\bin\tracer-home\store\x64\net8.0\microsoft.extensions.configuration.binder\8.0.0\lib\net8.0\Microsoft.Extensions.Configuration.Binder.dll - 3.100.19.56504.
[2023-12-14T01:53:34.0550699Z] [Error] Rule Engine: Application has direct or indirect reference to lower version of runtime store assembly \opentelemetry-dotnet-instrumentation\bin\tracer-home\store\x64\net8.0\microsoft.extensions.dependencyinjection\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.dll - 3.100.19.56504.
[2023-12-14T01:53:34.2610289Z] [Error] Rule Engine: Application has direct or indirect reference to lower version of runtime store assembly \opentelemetry-dotnet-instrumentation\bin\tracer-home\store\x64\net8.0\microsoft.extensions.dependencyinjection.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll - 3.100.19.56504.
[2023-12-14T01:53:34.3787514Z] [Error] Rule Engine: Application has direct or indirect reference to lower version of runtime store assembly \opentelemetry-dotnet-instrumentation\bin\tracer-home\store\x64\net8.0\microsoft.extensions.logging\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.dll - 3.100.19.56504.
[2023-12-14T01:53:34.4474942Z] [Error] Rule Engine: Application has direct or indirect reference to lower version of runtime store assembly \opentelemetry-dotnet-instrumentation\bin\tracer-home\store\x64\net8.0\microsoft.extensions.logging.abstractions\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Abstractions.dll - 3.100.19.56504.
[2023-12-14T01:53:34.5416545Z] [Error] Rule Engine: Application has direct or indirect reference to lower version of runtime store assembly \opentelemetry-dotnet-instrumentation\bin\tracer-home\store\x64\net8.0\microsoft.extensions.logging.configuration\8.0.0\lib\net8.0\Microsoft.Extensions.Logging.Configuration.dll - 3.100.19.56504.
[2023-12-14T01:53:34.6509143Z] [Error] Rule Engine: Application has direct or indirect reference to lower version of runtime store assembly \opentelemetry-dotnet-instrumentation\bin\tracer-home\store\x64\net8.0\microsoft.extensions.options\8.0.0\lib\net8.0\Microsoft.Extensions.Options.dll - 3.100.19.56504.
[2023-12-14T01:53:34.6928878Z] [Error] Rule Engine: Application has direct or indirect reference to lower version of runtime store assembly \opentelemetry-dotnet-instrumentation\bin\tracer-home\store\x64\net8.0\microsoft.extensions.options.configurationextensions\8.0.0\lib\net8.0\Microsoft.Extensions.Options.ConfigurationExtensions.dll - 3.100.19.56504.
[2023-12-14T01:53:34.8209054Z] [Error] Rule Engine: Application has direct or indirect reference to lower version of runtime store assembly \opentelemetry-dotnet-instrumentation\bin\tracer-home\store\x64\net8.0\microsoft.extensions.primitives\8.0.0\lib\net8.0\Microsoft.Extensions.Primitives.dll - 3.100.19.56504.

@nrcventura
Copy link
Member

We may need to hold on to this PR till 1.7 release. All the test apps that uses OpenTelemetry SDK fails.

Will this problem just come up again when .net 9 is released next year?

@rajkumar-rangaraj
Copy link
Contributor Author

We may need to hold on to this PR till 1.7 release. All the test apps that uses OpenTelemetry SDK fails.

Will this problem just come up again when .net 9 is released next year?

No. It should not impact with .NET 9 release.
Here, the issue was related to the OpenTelemetry SDK referencing an older package of Microsoft.Extensions.*. I'm planning to resolve this issue by adding a special case to the rule.

@rajkumar-rangaraj rajkumar-rangaraj marked this pull request as draft January 2, 2024 17:46
@rajkumar-rangaraj rajkumar-rangaraj changed the title Add the RuntimeStoreVersionRule to resolve file loading issues originating from Runtime store libraries [WIP] Add the RuntimeStoreVersionRule to resolve file loading issues originating from Runtime store libraries Jan 2, 2024
@rajkumar-rangaraj rajkumar-rangaraj changed the title [WIP] Add the RuntimeStoreVersionRule to resolve file loading issues originating from Runtime store libraries Add Diagnostic Logging for Runtime Store Assembly Version Validation Jan 5, 2024
@rajkumar-rangaraj rajkumar-rangaraj marked this pull request as ready for review January 5, 2024 20:37
@rajkumar-rangaraj
Copy link
Contributor Author

This PR is ready for review. PTAL.

@pjanotti
Copy link
Contributor

It will be good to add a mention of it to the troubleshooting guide.

@Kielek Kielek enabled auto-merge (squash) January 12, 2024 06:21
@Kielek Kielek merged commit d86764d into open-telemetry:main Jan 12, 2024
31 checks passed
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 this pull request may close these issues.

5 participants