When I'm running this code, the assembly version is of the App.Metrics.DotNetRuntime, rather than the host process, which I'd have though to be a much more useful value to have exposed that this single assembly.
Would you consider using Assembly.GetExecutingAssembly().GetName().Version.ToString
over this.GetType().Assembly.GetName().Version.ToString()
or to avoid a breaking change, add a new attribute ?
This is an example output using 2.1.0 of App.Metrics.DotNetRuntime
dotnet_build_info{version="2.1.0.0",target_framework=".NETCoreApp,Version=v5.0",runtime_version=".NET 5.0.7",os_version="Linux 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021",process_architecture="X64",host="6c3d08b734b4",environment="development"}
Code in question
|
this.GetType().Assembly.GetName().Version.ToString(), |