From 25250852f2dcca889892b94e7347f1944e786f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Mon, 27 Nov 2023 10:51:56 +0100 Subject: [PATCH 1/8] .NET runtime process resource attributes --- docs/resource/process.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/resource/process.md b/docs/resource/process.md index b3817f34df..4309de80e3 100644 --- a/docs/resource/process.md +++ b/docs/resource/process.md @@ -156,13 +156,19 @@ Examples for some JavaScript runtimes ### .NET Runtimes -TODO(): Confirm the contents here +.NET instrumentation should fill in the values by following values: -| Value | Description | -| --- | --- | -| `dotnet-core` | .NET Core, .NET 5+ | -| `dotnet-framework` | .NET Framework | -| `mono` | Mono | +- `process.runtime.name` - Fill in the value by the name of runtime. +- `process.runtime.version` - Fill in the value of `System.Environment.Version`. +- `process.runtime.description` - Fill in the values of `System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription`. + +Examples for some .NET runtimes + +| Name | `process.runtime.name` | `process.runtime.version` | `process.runtime.description` | +| --- | --- | --- | --- | +| .NET Framework | .NET Framework | 4.0.30319.42000 | .NET Framework 4.8.9195.0 | +| .NET Core | .NET Core | 3.1.32 | .NET Core 3.1.32 | +| .NET | .NET | 7.0.14 | .NET 7.0.14 | ### Python Runtimes From bd7364cad0fd0e65e941c4a0da1f46bca0495854 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Mon, 27 Nov 2023 11:04:57 +0100 Subject: [PATCH 2/8] Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e27d9b938e..4a746584da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,8 @@ release. ([#21](https://github.com/open-telemetry/semantic-conventions/pull/21)) - Add `messaging.gcp_pubsub.message.ordering_key` attribute. ([#528](https://github.com/open-telemetry/semantic-conventions/pull/528)) +- Define how to set `process.runtime.name`, `process.runtime.version`, `process.runtime.description` for .NET runtime. + ([#561](https://github.com/open-telemetry/semantic-conventions/pull/561)) ### Fixes From 971bc0acd6b4a8dab59ac72b1938c90330cf45eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Mon, 27 Nov 2023 13:23:57 +0100 Subject: [PATCH 3/8] remove .NET Core reference --- docs/resource/process.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/resource/process.md b/docs/resource/process.md index 4309de80e3..379956d053 100644 --- a/docs/resource/process.md +++ b/docs/resource/process.md @@ -167,7 +167,6 @@ Examples for some .NET runtimes | Name | `process.runtime.name` | `process.runtime.version` | `process.runtime.description` | | --- | --- | --- | --- | | .NET Framework | .NET Framework | 4.0.30319.42000 | .NET Framework 4.8.9195.0 | -| .NET Core | .NET Core | 3.1.32 | .NET Core 3.1.32 | | .NET | .NET | 7.0.14 | .NET 7.0.14 | ### Python Runtimes From d6d65358e52aaa80411bb21b61e2a890842c9274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Mon, 27 Nov 2023 13:28:27 +0100 Subject: [PATCH 4/8] should -> SHOULD --- docs/resource/process.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/resource/process.md b/docs/resource/process.md index 379956d053..f2c0512be1 100644 --- a/docs/resource/process.md +++ b/docs/resource/process.md @@ -85,7 +85,7 @@ Example: ### Go Runtimes -Go Runtimes should fill in the as follows: +Go Runtimes SHOULD fill in the as follows: - `process.runtime.name` - Fill in an interpretation of Go's [`runtime.Compiler`](https://pkg.go.dev/runtime#Compiler) constant, according to the following rule: If the value is `gc`, fill in `go`. Otherwise, fill in the exact value of `runtime.Compiler`. @@ -116,7 +116,7 @@ Examples for some Go compilers/runtimes: ### Java runtimes -Java instrumentation should fill in the values by copying from system properties. +Java instrumentation SHOULD fill in the values by copying from system properties. - `process.runtime.name` - Fill in the value of `java.runtime.name` as is - `process.runtime.version` - Fill in the value of `java.runtime.version` as is @@ -138,7 +138,7 @@ Examples for some Java runtimes ### JavaScript runtimes -JavaScript instrumentation should fill in the values by copying from built-in runtime constants. +JavaScript instrumentation SHOULD fill in the values by copying from built-in runtime constants. - `process.runtime.name`: - When the runtime is Node.js, fill in the constant value `nodejs`. @@ -156,7 +156,7 @@ Examples for some JavaScript runtimes ### .NET Runtimes -.NET instrumentation should fill in the values by following values: +.NET instrumentation SHOULD fill in the values by following values: - `process.runtime.name` - Fill in the value by the name of runtime. - `process.runtime.version` - Fill in the value of `System.Environment.Version`. @@ -171,7 +171,7 @@ Examples for some .NET runtimes ### Python Runtimes -Python instrumentation should fill in the values as follows: +Python instrumentation SHOULD fill in the values as follows: - `process.runtime.name` - Fill in the value of [`sys.implementation.name`][py_impl] @@ -212,7 +212,7 @@ Pypy provided a CPython-compatible version in `sys.implementation.version` inste ### Ruby Runtimes -Ruby instrumentation should fill in the values by copying from built-in runtime constants. +Ruby instrumentation SHOULD fill in the values by copying from built-in runtime constants. - `process.runtime.name` - Fill in the value of `RUBY_ENGINE` as is - `process.runtime.version` - Fill in the value of `RUBY_VERSION` as is From d790b17aeb91419b9ec5bde32a1dfcb0d8a206f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Thu, 30 Nov 2023 10:29:08 +0100 Subject: [PATCH 5/8] SIG feedback --- docs/resource/process.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/resource/process.md b/docs/resource/process.md index f2c0512be1..c62b28abe3 100644 --- a/docs/resource/process.md +++ b/docs/resource/process.md @@ -159,14 +159,16 @@ Examples for some JavaScript runtimes .NET instrumentation SHOULD fill in the values by following values: - `process.runtime.name` - Fill in the value by the name of runtime. -- `process.runtime.version` - Fill in the value of `System.Environment.Version`. +- `process.runtime.version` - Fill in the value of `System.Environment.Version` for .NET, + Use version part from `System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription` + for .NET Framework. - `process.runtime.description` - Fill in the values of `System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription`. Examples for some .NET runtimes | Name | `process.runtime.name` | `process.runtime.version` | `process.runtime.description` | | --- | --- | --- | --- | -| .NET Framework | .NET Framework | 4.0.30319.42000 | .NET Framework 4.8.9195.0 | +| .NET Framework | .NET Framework | 4.8.9195.0 | .NET Framework 4.8.9195.0 | | .NET | .NET | 7.0.14 | .NET 7.0.14 | ### Python Runtimes From 6c13a65197245803f510c5dd7938eb0f3dc6fc22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Fri, 1 Dec 2023 13:03:55 +0100 Subject: [PATCH 6/8] use registry --- docs/resource/process.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/resource/process.md b/docs/resource/process.md index c62b28abe3..0fc7615406 100644 --- a/docs/resource/process.md +++ b/docs/resource/process.md @@ -160,8 +160,8 @@ Examples for some JavaScript runtimes - `process.runtime.name` - Fill in the value by the name of runtime. - `process.runtime.version` - Fill in the value of `System.Environment.Version` for .NET, - Use version part from `System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription` - for .NET Framework. + determine version based on the [registry values](https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed#query-the-registry-using-code) + for .NET Framework - `process.runtime.description` - Fill in the values of `System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription`. Examples for some .NET runtimes From aee236b106c3e19b088021f003b1be17c77427c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Fri, 1 Dec 2023 13:04:07 +0100 Subject: [PATCH 7/8] List well-known values --- docs/resource/process.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/resource/process.md b/docs/resource/process.md index 0fc7615406..319dc4e51c 100644 --- a/docs/resource/process.md +++ b/docs/resource/process.md @@ -164,6 +164,13 @@ Examples for some JavaScript runtimes for .NET Framework - `process.runtime.description` - Fill in the values of `System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription`. +`process.runtime.name` has the following list of well-known values. If one of them applies, then the respective value SHOULD be used, otherwise a custom value SHOULD be used. + +- .NET Framework +- .NET +- .NET Core +- .NET Native + Examples for some .NET runtimes | Name | `process.runtime.name` | `process.runtime.version` | `process.runtime.description` | From cf8c1f968c80ed0fff862ad80ac32d76104078af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Kie=C5=82kowicz?= Date: Fri, 1 Dec 2023 13:08:44 +0100 Subject: [PATCH 8/8] Update examples --- docs/resource/process.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/resource/process.md b/docs/resource/process.md index 319dc4e51c..fb6a3a58f2 100644 --- a/docs/resource/process.md +++ b/docs/resource/process.md @@ -175,7 +175,7 @@ Examples for some .NET runtimes | Name | `process.runtime.name` | `process.runtime.version` | `process.runtime.description` | | --- | --- | --- | --- | -| .NET Framework | .NET Framework | 4.8.9195.0 | .NET Framework 4.8.9195.0 | +| .NET Framework | .NET Framework | 4.8 | .NET Framework 4.8.9195.0 | | .NET | .NET | 7.0.14 | .NET 7.0.14 | ### Python Runtimes