Skip to content

Commit 0f489d2

Browse files
committed
add span reparenting field child_ids (elastic#3679)
1 parent e7e55f8 commit 0f489d2

File tree

26 files changed

+86
-11
lines changed

26 files changed

+86
-11
lines changed

beater/test_approved_es_documents/TestPublishIntegrationSpans.approved.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
"name": "elastic-node",
1313
"version": "3.14.0"
1414
},
15+
"child": {
16+
"id": [
17+
"51234abcdef56789"
18+
]
19+
},
1520
"container": {
1621
"id": "container-id"
1722
},

docs/data/elasticsearch/generated/spans.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,11 @@
297297
"name": "GET /api/types",
298298
"id": "3aaaaaaaaaaaaaaa"
299299
},
300+
"child": {
301+
"id": [
302+
"4aaaaaaaaaaaaaaa"
303+
]
304+
},
300305
"trace": {
301306
"id": "945254c567a5417eaaaaaaaaaaaaaaaa"
302307
},

docs/fields.asciidoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,6 +1370,17 @@ format: url
13701370
--
13711371
13721372
1373+
*`child.id`*::
1374+
+
1375+
--
1376+
The ID(s)s of the child event(s).
1377+
1378+
1379+
type: keyword
1380+
1381+
--
1382+
1383+
13731384
*`span.id`*::
13741385
+
13751386
--

docs/spec/spans/span.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@
2828
"type": "string",
2929
"maxLength": 1024
3030
},
31+
"child_ids": {
32+
"description": "List of successor transactions and/or spans.",
33+
"type": ["array", "null"],
34+
"minItems": 0,
35+
"maxLength": 1024,
36+
"items": {
37+
"type": "string",
38+
"maxLength": 1024
39+
}
40+
},
3141
"start": {
3242
"type": ["number", "null"],
3343
"description": "Offset relative to the transaction's timestamp identifying the start of the span, in milliseconds"

include/fields.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

model/modeldecoder/container_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ package modeldecoder
2020
import (
2121
"testing"
2222

23-
"github.com/elastic/apm-server/model"
2423
"github.com/stretchr/testify/assert"
24+
25+
"github.com/elastic/apm-server/model"
2526
)
2627

2728
func TestContainerDecode(t *testing.T) {

model/modeldecoder/kubernetes_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ package modeldecoder
2020
import (
2121
"testing"
2222

23-
"github.com/elastic/apm-server/model"
2423
"github.com/stretchr/testify/assert"
24+
25+
"github.com/elastic/apm-server/model"
2526
)
2627

2728
func TestKubernetesDecode(t *testing.T) {

model/modeldecoder/metadata.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222
"github.com/santhosh-tekuri/jsonschema"
2323

2424
"github.com/elastic/apm-server/model"
25-
"github.com/elastic/apm-server/model/modeldecoder/field"
2625
"github.com/elastic/apm-server/model/metadata/generated/schema"
26+
"github.com/elastic/apm-server/model/modeldecoder/field"
2727
"github.com/elastic/apm-server/validation"
2828
)
2929

model/modeldecoder/metricset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323
"github.com/pkg/errors"
2424

2525
"github.com/elastic/apm-server/model"
26-
"github.com/elastic/apm-server/model/modeldecoder/field"
2726
"github.com/elastic/apm-server/model/metricset/generated/schema"
27+
"github.com/elastic/apm-server/model/modeldecoder/field"
2828
"github.com/elastic/apm-server/transform"
2929
"github.com/elastic/apm-server/utility"
3030
"github.com/elastic/apm-server/validation"

model/modeldecoder/process_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ package modeldecoder
2020
import (
2121
"testing"
2222

23-
"github.com/elastic/apm-server/model"
2423
"github.com/stretchr/testify/assert"
24+
25+
"github.com/elastic/apm-server/model"
2526
)
2627

2728
func TestProcessDecode(t *testing.T) {

0 commit comments

Comments
 (0)