Skip to content

Commit c7371e5

Browse files
authored
Stop adding process.runtime.description to resource (#1986)
* Stop adding process.runtime.description to resource Fix #1983 * Update test expectations * Add a changelog entry * Remove runtime desc attr fix for e2e test
1 parent 2a0f875 commit c7371e5

File tree

11 files changed

+1
-60
lines changed

11 files changed

+1
-60
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ OpenTelemetry Go Automatic Instrumentation adheres to [Semantic Versioning](http
3636
### Fixed
3737

3838
- Fix spans parsing from eBPF for the legacy (go version < 1.24 otel-go < 1.33) otel global instrumentation. ([#1960](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/1960))
39+
- Stop adding `process.runtime.description` to `Resource` to follow OpenTelemetry semantic conventions. ([#1986](https://github.com/open-telemetry/opentelemetry-go-instrumentation/pull/1986))
3940

4041
## [v0.21.0] - 2025-02-18
4142

instrumentation.go

-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"log/slog"
1111
"os"
1212
"path/filepath"
13-
"runtime"
1413
"strconv"
1514
"strings"
1615
"sync"
@@ -277,16 +276,11 @@ func (c instConfig) res() (res *resource.Resource) {
277276
if runName == "gc" {
278277
runName = "go"
279278
}
280-
runDesc := fmt.Sprintf(
281-
"go version %s %s/%s",
282-
bi.GoVersion, runtime.GOOS, runtime.GOARCH,
283-
)
284279

285280
attrs = append(
286281
attrs,
287282
semconv.ProcessRuntimeName(runName),
288283
semconv.ProcessRuntimeVersion(bi.GoVersion),
289-
semconv.ProcessRuntimeDescription(runDesc),
290284
)
291285

292286
return res

internal/test/e2e/autosdk/traces.json

-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
{
44
"resource": {
55
"attributes": [
6-
{
7-
"key": "process.runtime.description",
8-
"value": {
9-
"stringValue": "go version 1.24.1 linux/VALID_ARCH"
10-
}
11-
},
126
{
137
"key": "process.runtime.name",
148
"value": {

internal/test/e2e/databasesql/traces.json

-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
{
44
"resource": {
55
"attributes": [
6-
{
7-
"key": "process.runtime.description",
8-
"value": {
9-
"stringValue": "go version 1.24.1 linux/VALID_ARCH"
10-
}
11-
},
126
{
137
"key": "process.runtime.name",
148
"value": {

internal/test/e2e/gin/traces.json

-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
{
44
"resource": {
55
"attributes": [
6-
{
7-
"key": "process.runtime.description",
8-
"value": {
9-
"stringValue": "go version 1.24.1 linux/VALID_ARCH"
10-
}
11-
},
126
{
137
"key": "process.runtime.name",
148
"value": {

internal/test/e2e/grpc/traces.json

-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
{
44
"resource": {
55
"attributes": [
6-
{
7-
"key": "process.runtime.description",
8-
"value": {
9-
"stringValue": "go version 1.24.1 linux/VALID_ARCH"
10-
}
11-
},
126
{
137
"key": "process.runtime.name",
148
"value": {

internal/test/e2e/kafka-go/traces.json

-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
{
44
"resource": {
55
"attributes": [
6-
{
7-
"key": "process.runtime.description",
8-
"value": {
9-
"stringValue": "go version 1.24.1 linux/VALID_ARCH"
10-
}
11-
},
126
{
137
"key": "process.runtime.name",
148
"value": {

internal/test/e2e/nethttp/traces.json

-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
{
44
"resource": {
55
"attributes": [
6-
{
7-
"key": "process.runtime.description",
8-
"value": {
9-
"stringValue": "go version 1.24.1 linux/VALID_ARCH"
10-
}
11-
},
126
{
137
"key": "process.runtime.name",
148
"value": {

internal/test/e2e/nethttp_custom/traces.json

-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
{
44
"resource": {
55
"attributes": [
6-
{
7-
"key": "process.runtime.description",
8-
"value": {
9-
"stringValue": "go version 1.24.1 linux/VALID_ARCH"
10-
}
11-
},
126
{
137
"key": "process.runtime.name",
148
"value": {

internal/test/e2e/otelglobal/traces.json

-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@
33
{
44
"resource": {
55
"attributes": [
6-
{
7-
"key": "process.runtime.description",
8-
"value": {
9-
"stringValue": "go version 1.24.1 linux/VALID_ARCH"
10-
}
11-
},
126
{
137
"key": "process.runtime.name",
148
"value": {

internal/test/test_helpers/utilities.sh

-6
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,6 @@ redact_json() {
161161
end
162162
| .resourceSpans[].scopeSpans|=sort_by(.scope.name)
163163
| .resourceSpans[].scopeSpans[].spans|=sort_by(.kind)
164-
| .resourceSpans[].resource.attributes[]? |= if
165-
(.key == "process.runtime.description") then
166-
.value.stringValue |= sub("amd64|arm64"; "VALID_ARCH")
167-
else
168-
.
169-
end
170164
' > ${BATS_TEST_DIRNAME}/traces.json
171165
}
172166

0 commit comments

Comments
 (0)