opentelemetry-dotnet
opentelemetry-dotnet copied to clipboard
Confirm specification for runtime information
open-telemetry/opentelemetry-specification#882 is adding a list of well-known runtime information to the specification to populate in the Resource. The author (me) only knows Java well and has guessed at helpful values for other languages. Please check the spec and update it if there is anything that should be fixed or could be more clear. Thanks!
I can flesh this out more (I kinda made up the version for netcore), but I'm wondering if this is the direction to go with dotnet:
Name | process.runtime.name |
process.runtime.version |
process.runtime.description |
---|---|---|---|
.Net 5+ | .Net | 6.0.0-rtm.21522.10 | .NET 6.0.0-rtm.21522.10 |
.Net Core | .Net Core | 3.1.100 | .NET Core 3.1.100 |
@reyang I see you thumbsup'd the original comment, are you person to ask?
@reyang I see you thumbsup'd the original comment, are you person to ask?
I'm not. I think it requires a considerable amount of energy/time (which I don't have at this moment), as there are multiple things to be considered:
- .NET Full Framework vs. Compact vs. .NET Core vs. Mono etc.
- Wks vs Svr GC mode.
- Whether AOT (ahead-of-time compilation) is enabled or not, perhaps trimming is also interesting.
Thanks for the response, that's something I can at least try to look into more. Number 1 is what I already assumed I needed to list out in the end, but I hadn't considered 2 & 3.
When I do have a more thorough proposal that includes them, mind if I check back in with you to get a recommendation on who I should run it by?
I might be able to get some folks from the .NET runtime team to help out here. I'm not sure if it is a priority, and I'm also not sure if this is even the right direction (e.g. what to do if we have an interop story or hosting story, I can imagine a process/program which has multiple language runtimes).
To be fair, it wasn't a priority for me, I just noticed this when I was doing more research for my other conversation on metrics, and it seemed straightforward at first glance...I need to stop picking things to look at that are hidden cans of worms.
The best starting point is https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.runtimeinformation?view=net-6.0.
Again...I need to find something that doesn't spiral...
I was looking at that earlier and glossing over all but framework description. I'll revisit it, though, and try to come up with something that makes sense. I think most of those fields have a good chance of falling under other metric categories, so I got a lot of reading ahead of me...
Oh, and thanks for the advice/guidance!
Did yah end up moving forward with this? A relatively straightfoward mapping of RuntimeInformation.FrameworkDescription
to name
, version
, and description
seems reasonable.
Solved by https://github.com/open-telemetry/semantic-conventions/pull/561
If you are looking for the implementation you can find it in conrtib repository under: https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.ResourceDetectors.ProcessRuntime
or download from https://www.nuget.org/packages/OpenTelemetry.ResourceDetectors.ProcessRuntime/0.1.0-alpha.1