Skip to content

Commit

Permalink
build: bump apm-data (#11311)
Browse files Browse the repository at this point in the history
* build: bump apm-data

* build: fix compile errors and failing tests

* test: ignore span.id in systemtest approval

* test: update systemtest approved documents
  • Loading branch information
kruskall authored Jul 28, 2023
1 parent c680645 commit 5ff6ffa
Show file tree
Hide file tree
Showing 40 changed files with 557 additions and 663 deletions.
4 changes: 2 additions & 2 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,11 @@ SOFTWARE.

--------------------------------------------------------------------------------
Dependency : github.com/elastic/apm-data
Version: v0.1.1-0.20230718152028-9c38d2361527
Version: v0.1.1-0.20230727133025-e3e170b1fded
Licence type (autodetected): Apache-2.0
--------------------------------------------------------------------------------

Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].20230718152028-9c38d2361527/LICENSE:
Contents of probable licence file $GOMODCACHE/github.com/elastic/[email protected].20230727133025-e3e170b1fded/LICENSE:

Apache License
Version 2.0, January 2004
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/cespare/xxhash/v2 v2.2.0
github.com/dgraph-io/badger/v2 v2.2007.3-0.20201012072640-f5a7e0a1c83b
github.com/dustin/go-humanize v1.0.1
github.com/elastic/apm-data v0.1.1-0.20230718152028-9c38d2361527
github.com/elastic/apm-data v0.1.1-0.20230727133025-e3e170b1fded
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20230727143857-7fd27bf1f6c4
github.com/elastic/elastic-agent-client/v7 v7.1.2
github.com/elastic/elastic-agent-libs v0.3.9
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ github.com/eapache/go-xerial-snappy v0.0.0-20230111030713-bf00bc1b83b6 h1:8yY/I9
github.com/eapache/go-xerial-snappy v0.0.0-20230111030713-bf00bc1b83b6/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0=
github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
github.com/elastic/apm-data v0.1.1-0.20230718152028-9c38d2361527 h1:ASiUA/r0Wwnhn3HXvNuLzn23ljsKJeQRZsDdODlxMco=
github.com/elastic/apm-data v0.1.1-0.20230718152028-9c38d2361527/go.mod h1:lMTMoCWNadiDJih/tLechuMTtumEeedtKJlBOYAv030=
github.com/elastic/apm-data v0.1.1-0.20230727133025-e3e170b1fded h1:2J9lQKt+f8NUtyvEmxROEGgz/kTnPoUuVhKexM289J8=
github.com/elastic/apm-data v0.1.1-0.20230727133025-e3e170b1fded/go.mod h1:lMTMoCWNadiDJih/tLechuMTtumEeedtKJlBOYAv030=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20230727143857-7fd27bf1f6c4 h1:sICugAEku+oUCgX9p5UkZk0UtzM0yatddqz0ufEObmE=
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20230727143857-7fd27bf1f6c4/go.mod h1:4vXAyKpsDLbuLh5WpMEQDi87RNpVFUxNqj4rrY2TaLg=
github.com/elastic/elastic-agent-autodiscover v0.6.2 h1:7P3cbMBWXjbzA80rxitQjc+PiWyZ4I4F4LqrCYgYlNc=
Expand Down
3 changes: 2 additions & 1 deletion internal/beater/processors.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (

"go.elastic.co/fastjson"

"github.com/elastic/apm-data/model/modeljson"
"github.com/elastic/apm-data/model/modelpb"
"github.com/elastic/apm-server/internal/beater/auth"
"github.com/elastic/apm-server/internal/beater/ratelimit"
Expand Down Expand Up @@ -103,7 +104,7 @@ func newDocappenderBatchProcessor(a *docappender.Appender) modelpb.ProcessBatchF
return func(ctx context.Context, b *modelpb.Batch) error {
for _, event := range *b {
r := pool.Get().(*pooledReader)
if err := event.MarshalFastJSON(&r.jsonw); err != nil {
if err := modeljson.MarshalAPMEvent(event, &r.jsonw); err != nil {
r.reset()
return err
}
Expand Down
3 changes: 2 additions & 1 deletion internal/publish/pub.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (

"github.com/elastic/beats/v7/libbeat/beat"

"github.com/elastic/apm-data/model/modeljson"
"github.com/elastic/apm-data/model/modelpb"
)

Expand Down Expand Up @@ -194,7 +195,7 @@ func (t batchTransformer) Transform(context.Context) []beat.Event {
// from the intermediate map representation for events,
// and encode directly to JSON, minimising garbage for
// the Elasticsearch output.
if err := event.MarshalFastJSON(&w); err != nil {
if err := modeljson.MarshalAPMEvent(event, &w); err != nil {
continue
}
beatEvent := beat.Event{Timestamp: event.Timestamp.AsTime()}
Expand Down
16 changes: 10 additions & 6 deletions systemtest/approvals/TestCompressedSpans.approved.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"name": "go",
"version": "0.0.0"
},
"data_stream.dataset": "apm",
"data_stream.namespace": "default",
"data_stream.type": "traces",
"data_stream": {
"dataset": "apm",
"namespace": "default",
"type": "traces"
},
"event": {
"agent_id_status": "missing",
"ingested": "dynamic",
Expand Down Expand Up @@ -97,9 +99,11 @@
"name": "go",
"version": "0.0.0"
},
"data_stream.dataset": "apm",
"data_stream.namespace": "default",
"data_stream.type": "traces",
"data_stream": {
"dataset": "apm",
"namespace": "default",
"type": "traces"
},
"event": {
"agent_id_status": "missing",
"ingested": "dynamic",
Expand Down
22 changes: 16 additions & 6 deletions systemtest/approvals/TestDropUnsampled.approved.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"name": "go",
"version": "0.0.0"
},
"data_stream.dataset": "apm",
"data_stream.namespace": "default",
"data_stream.type": "traces",
"data_stream": {
"dataset": "apm",
"namespace": "default",
"type": "traces"
},
"event": {
"agent_id_status": "missing",
"ingested": "dynamic",
Expand Down Expand Up @@ -52,6 +54,9 @@
"version": "2.0"
}
},
"span": {
"id": "dynamic"
},
"timestamp": {
"us": "dynamic"
},
Expand Down Expand Up @@ -82,9 +87,11 @@
"client": {
"ip": "127.0.0.1"
},
"data_stream.dataset": "apm.rum",
"data_stream.namespace": "default",
"data_stream.type": "traces",
"data_stream": {
"dataset": "apm.rum",
"namespace": "default",
"type": "traces"
},
"event": {
"agent_id_status": "missing",
"ingested": "dynamic",
Expand All @@ -105,6 +112,9 @@
"ip": "127.0.0.1",
"port": "dynamic"
},
"span": {
"id": "dynamic"
},
"timestamp": {
"us": "dynamic"
},
Expand Down
11 changes: 8 additions & 3 deletions systemtest/approvals/TestErrorIngest.approved.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@
"container": {
"id": "container-id"
},
"data_stream.dataset": "apm.error",
"data_stream.namespace": "default",
"data_stream.type": "logs",
"data_stream": {
"dataset": "apm.error",
"namespace": "default",
"type": "logs"
},
"error": {
"grouping_key": "d6b3f958dfea98dc9ed2b57d5f0c48bb",
"grouping_name": "Cannot read property 'baz' of undefined",
Expand Down Expand Up @@ -111,6 +113,9 @@
},
"version": "5.1.3"
},
"span": {
"id": "1234567890987654"
},
"timestamp": {
"us": 1533827045999000
},
Expand Down
78 changes: 0 additions & 78 deletions systemtest/approvals/TestFleetIntegration.approved.json

This file was deleted.

Loading

0 comments on commit 5ff6ffa

Please sign in to comment.