diff --git a/beater/test_approved_es_documents/TestPublishIntegrationErrors.approved.json b/beater/test_approved_es_documents/TestPublishIntegrationErrors.approved.json index 6314eb8227b..80ccaf6f9a9 100644 --- a/beater/test_approved_es_documents/TestPublishIntegrationErrors.approved.json +++ b/beater/test_approved_es_documents/TestPublishIntegrationErrors.approved.json @@ -327,8 +327,7 @@ "runtime": { "name": "node", "version": "8.0.0" - }, - "version": "5.1.3" + } }, "source": { "ip": "12.53.12.1" diff --git a/beater/test_approved_es_documents/TestPublishIntegrationEvents.approved.json b/beater/test_approved_es_documents/TestPublishIntegrationEvents.approved.json index 36f216bad7a..b723c7e6687 100644 --- a/beater/test_approved_es_documents/TestPublishIntegrationEvents.approved.json +++ b/beater/test_approved_es_documents/TestPublishIntegrationEvents.approved.json @@ -261,8 +261,7 @@ "runtime": { "name": "Java", "version": "10.0.2" - }, - "version": "4.3.0" + } }, "source": { "ip": "12.53.12.1" @@ -400,8 +399,7 @@ "runtime": { "name": "Java", "version": "10.0.2" - }, - "version": "4.3.0" + } }, "span": { "action": "connect", @@ -602,8 +600,7 @@ "runtime": { "name": "Java", "version": "10.0.2" - }, - "version": "4.3.0" + } }, "source": { "ip": "12.53.12.1", diff --git a/beater/test_approved_es_documents/TestPublishIntegrationSpans.approved.json b/beater/test_approved_es_documents/TestPublishIntegrationSpans.approved.json index 87c5f7e8aab..91fb6393a65 100644 --- a/beater/test_approved_es_documents/TestPublishIntegrationSpans.approved.json +++ b/beater/test_approved_es_documents/TestPublishIntegrationSpans.approved.json @@ -655,8 +655,7 @@ "runtime": { "name": "node", "version": "8.0.0" - }, - "version": "5.1.3" + } }, "span": { "action": "query", diff --git a/changelogs/head.asciidoc b/changelogs/head.asciidoc index 8787533558a..bc972b4ac50 100644 --- a/changelogs/head.asciidoc +++ b/changelogs/head.asciidoc @@ -14,6 +14,7 @@ See <> for more information. [float] ==== Bug fixes - Fix infinite loop in tail-based sampling subscriber causing high CPU and repeated Elasticsearch searches {pull}7211[7211] +- Do not overwrite `service version` if no transaction/error/... specific `service.name` is givven {pull}7281[7281] [float] ==== Intake API Changes diff --git a/model/modeldecoder/rumv3/decoder.go b/model/modeldecoder/rumv3/decoder.go index 433051c2ede..65b741ac722 100644 --- a/model/modeldecoder/rumv3/decoder.go +++ b/model/modeldecoder/rumv3/decoder.go @@ -436,6 +436,7 @@ func mapToServiceModel(from contextService, out *model.Service) { } if from.Name.IsSet() { out.Name = from.Name.Val + out.Version = from.Version.Val } if from.Runtime.Name.IsSet() { out.Runtime.Name = from.Runtime.Name.Val @@ -443,9 +444,6 @@ func mapToServiceModel(from contextService, out *model.Service) { if from.Runtime.Version.IsSet() { out.Runtime.Version = from.Runtime.Version.Val } - if from.Version.IsSet() { - out.Version = from.Version.Val - } } func mapToAgentModel(from contextServiceAgent, out *model.Agent) { diff --git a/model/modeldecoder/v2/decoder.go b/model/modeldecoder/v2/decoder.go index 41bdaaa0a37..c005354abd2 100644 --- a/model/modeldecoder/v2/decoder.go +++ b/model/modeldecoder/v2/decoder.go @@ -763,6 +763,7 @@ func mapToServiceModel(from contextService, out *model.Service) { } if from.Name.IsSet() { out.Name = from.Name.Val + out.Version = from.Version.Val } if from.Node.Name.IsSet() { out.Node.Name = from.Node.Name.Val @@ -773,9 +774,6 @@ func mapToServiceModel(from contextService, out *model.Service) { if from.Runtime.Version.IsSet() { out.Runtime.Version = from.Runtime.Version.Val } - if from.Version.IsSet() { - out.Version = from.Version.Val - } if from.Origin.IsSet() { outOrigin := &model.ServiceOrigin{} if from.Origin.ID.IsSet() { diff --git a/processor/stream/test_approved_es_documents/testIntakeIntegrationErrors.approved.json b/processor/stream/test_approved_es_documents/testIntakeIntegrationErrors.approved.json index d3cdf91fea9..07e4b61c0c1 100644 --- a/processor/stream/test_approved_es_documents/testIntakeIntegrationErrors.approved.json +++ b/processor/stream/test_approved_es_documents/testIntakeIntegrationErrors.approved.json @@ -313,8 +313,7 @@ "runtime": { "name": "node", "version": "8.0.0" - }, - "version": "5.1.3" + } }, "source": { "ip": "12.53.12.1" diff --git a/processor/stream/test_approved_es_documents/testIntakeIntegrationEvents.approved.json b/processor/stream/test_approved_es_documents/testIntakeIntegrationEvents.approved.json index 38713e81cae..f745661db57 100644 --- a/processor/stream/test_approved_es_documents/testIntakeIntegrationEvents.approved.json +++ b/processor/stream/test_approved_es_documents/testIntakeIntegrationEvents.approved.json @@ -246,8 +246,7 @@ "runtime": { "name": "Java", "version": "10.0.2" - }, - "version": "4.3.0" + } }, "source": { "ip": "12.53.12.1" @@ -372,8 +371,7 @@ "runtime": { "name": "Java", "version": "10.0.2" - }, - "version": "4.3.0" + } }, "span": { "action": "connect", @@ -561,8 +559,7 @@ "runtime": { "name": "Java", "version": "10.0.2" - }, - "version": "4.3.0" + } }, "source": { "ip": "12.53.12.1", diff --git a/processor/stream/test_approved_es_documents/testIntakeIntegrationSpans.approved.json b/processor/stream/test_approved_es_documents/testIntakeIntegrationSpans.approved.json index 80c7596a65b..60cf7348c78 100644 --- a/processor/stream/test_approved_es_documents/testIntakeIntegrationSpans.approved.json +++ b/processor/stream/test_approved_es_documents/testIntakeIntegrationSpans.approved.json @@ -575,8 +575,7 @@ "runtime": { "name": "node", "version": "8.0.0" - }, - "version": "5.1.3" + } }, "span": { "action": "query",