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

Conditionally remove instrument caching in Metrics source-gen #5087

Open
xakep139 opened this issue Apr 8, 2024 · 0 comments
Open

Conditionally remove instrument caching in Metrics source-gen #5087

xakep139 opened this issue Apr 8, 2024 · 0 comments

Comments

@xakep139
Copy link
Member

xakep139 commented Apr 8, 2024

Right now we have caching of instruments in Metrics source-gen:

OutLn($"private static global::System.Collections.Concurrent.ConcurrentDictionary<{meterParam.Type}, {nsprefix}{metricMethod.MetricTypeName}>");

The original issue dotnet/runtime#84713 was resolved in System.Diagnostics.DiagnosticSource of version 8, thus we can check its version during generation time and not add any caching logic. If the package version if older than 8, we will produce the same codebase as we have now.

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

No branches or pull requests

1 participant