[.NET] remove the pattern of "using var meterProvider"
It'd be good to get a follow up PR to remove the pattern of "using var meterProvider", and prefer an explicit dispose().. We have a lot of people copying this to helper functions, and accidently causing it to get disposed() when helper method exits!
https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/docs/trace/getting-started-console/Program.cs#L27-L29
Separate PR to not further delay this PR
Originally posted by @cijothomas in https://github.com/open-telemetry/opentelemetry.io/pull/4016#discussion_r1504577727
aggghhh it makes me sad that people are copy-pasting a using var into a method that immediately goes out of scope, but alas, it makes sense
aggghhh it makes me sad that people are copy-pasting a
using varinto a method that immediately goes out of scope, but alas, it makes sense
Sorry that I make you sad, I just copy and pasted what I found, I have no idea about .NET 🤷♂️
Should be partially covered by #4310