opentelemetry-dotnet icon indicating copy to clipboard operation
opentelemetry-dotnet copied to clipboard

Confirm specification for runtime information

Open anuraaga opened this issue 4 years ago • 9 comments

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!

anuraaga avatar Sep 17 '20 04:09 anuraaga

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?

ktmitton avatar Nov 26 '21 23:11 ktmitton

@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:

  1. .NET Full Framework vs. Compact vs. .NET Core vs. Mono etc.
  2. Wks vs Svr GC mode.
  3. Whether AOT (ahead-of-time compilation) is enabled or not, perhaps trimming is also interesting.

reyang avatar Nov 27 '21 00:11 reyang

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?

ktmitton avatar Nov 27 '21 00:11 ktmitton

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).

reyang avatar Nov 27 '21 00:11 reyang

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.

ktmitton avatar Nov 27 '21 00:11 ktmitton

The best starting point is https://docs.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.runtimeinformation?view=net-6.0.

reyang avatar Nov 27 '21 00:11 reyang

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...

ktmitton avatar Nov 27 '21 01:11 ktmitton

Oh, and thanks for the advice/guidance!

ktmitton avatar Nov 27 '21 01:11 ktmitton

Did yah end up moving forward with this? A relatively straightfoward mapping of RuntimeInformation.FrameworkDescription to name, version, and description seems reasonable.

RichiCoder1 avatar Jul 08 '22 17:07 RichiCoder1

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

Kielek avatar Dec 04 '23 08:12 Kielek