Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/apm-server into add-api-e…
Browse files Browse the repository at this point in the history
…tc-docs
  • Loading branch information
bmorelli25 committed Oct 27, 2021
2 parents c5da5cf + 513fd05 commit b9a8578
Show file tree
Hide file tree
Showing 16 changed files with 431 additions and 349 deletions.
12 changes: 12 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ pull_request_rules:
git merge upstream/{{base}}
git push upstream {{head}}
```
- name: backport patches to 8.0 branch
conditions:
- merged
- base=master
- label=backport-8.0
actions:
backport:
assignees:
- "{{ author }}"
branches:
- "8.0"
title: "[{{ destination_branch }}] {{ title }} (backport #{{ number }})"
- name: backport patches to 7.16 branch
conditions:
- merged
Expand Down
458 changes: 229 additions & 229 deletions NOTICE.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion approvaltest/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ go 1.15
require (
github.com/fatih/color v1.12.0
github.com/google/go-cmp v0.5.2
github.com/tidwall/gjson v1.6.5
github.com/tidwall/gjson v1.9.3
github.com/tidwall/sjson v1.1.1
)
12 changes: 6 additions & 6 deletions approvaltest/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/tidwall/gjson v1.6.0/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls=
github.com/tidwall/gjson v1.6.5 h1:P/K9r+1pt9AK54uap7HcoIp6T3a7AoMg3v18tUis+Cg=
github.com/tidwall/gjson v1.6.5/go.mod h1:zeFuBCIqD4sN/gmqBzZ4j7Jd6UcA2Fc56x7QFsv+8fI=
github.com/tidwall/gjson v1.9.3 h1:hqzS9wAHMO+KVBBkLxYdkEeeFHuqr95GfClRLKlgK0E=
github.com/tidwall/gjson v1.9.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=
github.com/tidwall/match v1.0.3 h1:FQUVvBImDutD8wJLN6c5eMzWtjgONK9MwIBCOrUJKeE=
github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tidwall/pretty v1.0.1/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tidwall/pretty v1.0.2 h1:Z7S3cePv9Jwm1KwS0513MRaoUe3S01WPbLNV40pwWZU=
github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs=
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=
github.com/tidwall/sjson v1.1.1 h1:7h1vk049Jnd5EH9NyzNiEuwYW4b5qgreBbqRC19AS3U=
github.com/tidwall/sjson v1.1.1/go.mod h1:yvVuSnpEQv5cYIrO+AT6kw4QVfd5SDZoGIS7/5+fZFs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
8 changes: 8 additions & 0 deletions beater/api/asset/sourcemap/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ import (

"go.elastic.co/apm"

"github.com/elastic/beats/v7/libbeat/logp"
"github.com/elastic/beats/v7/libbeat/monitoring"

"github.com/elastic/apm-server/beater/auth"
"github.com/elastic/apm-server/beater/request"
logs "github.com/elastic/apm-server/log"
"github.com/elastic/apm-server/publish"
"github.com/elastic/apm-server/utility"
)
Expand All @@ -54,7 +56,13 @@ type AddedNotifier interface {

// Handler returns a request.Handler for managing asset requests.
func Handler(report publish.Reporter, notifier AddedNotifier) request.Handler {
logger := logp.NewLogger(logs.Sourcemap)
return func(c *request.Context) {
logger.Warn("" +
"Support for uploading source maps to APM Server is deprecated, and will be removed in 8.0. " +
"Please switch to the Kibana API: https://www.elastic.co/guide/en/kibana/7.16/rum-sourcemap-api.html",
)

if c.Request.Method != "POST" {
c.Result.SetDefault(request.IDResponseErrorsMethodNotAllowed)
c.Write()
Expand Down
15 changes: 15 additions & 0 deletions beater/api/asset/sourcemap/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

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

"github.com/elastic/apm-server/approvaltest"
"github.com/elastic/apm-server/beater/auth"
"github.com/elastic/apm-server/beater/beatertest"
Expand Down Expand Up @@ -123,6 +125,19 @@ func TestAssetHandler(t *testing.T) {
}
}

func TestLogDeprecation(t *testing.T) {
err := logp.DevelopmentSetup(logp.ToObserverOutput())
require.NoError(t, err)

tc := testcaseT{}
err = tc.setup()
require.NoError(t, err)

logs := logp.ObserverLogs().All()
require.Len(t, logs, 1)
assert.Contains(t, logs[0].Message, "Support for uploading source maps to APM Server is deprecated, and will be removed in 8.0")
}

type testcaseT struct {
w *httptest.ResponseRecorder
r *http.Request
Expand Down
1 change: 1 addition & 0 deletions changelogs/head.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,4 @@ https://github.com/elastic/apm-server/compare/7.15\...master[View commits]
- `span.http.*` fields are deprecated, replaced by `http.*`, and will be removed in 8.0 {pull}6147[6147]
- Add deprecation warning for `sampling.keep_unsampled=true` {pull}6285[6285]
- `processors.*` config, which was never officially supported in apm-server, is now explicitly deprecated and will be removed in 8.0 {pull}6367[6367]
- Support for uploading source maps to APM Server is deprecated, and will be removed in 8.0. Users should use the new Kibana REST API in conjunction with the integration package {pull}6432[6432]
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
package cmd

// name matches github.com/elastic/beats/v7/dev-tools/mage/settings.go parseBeatVersion
const defaultBeatVersion = "8.0.0"
const defaultBeatVersion = "8.1.0"
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ services:
kibana: { condition: service_healthy }

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-2f347a19-SNAPSHOT
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-af0b1af7-SNAPSHOT
ports:
- 9200:9200
healthcheck:
Expand Down Expand Up @@ -61,7 +61,7 @@ services:
- "./testing/docker/elasticsearch/users_roles:/usr/share/elasticsearch/config/users_roles"

kibana:
image: docker.elastic.co/kibana/kibana:8.0.0-2f347a19-SNAPSHOT
image: docker.elastic.co/kibana/kibana:8.0.0-af0b1af7-SNAPSHOT
ports:
- 5601:5601
healthcheck:
Expand All @@ -85,7 +85,7 @@ services:
package-registry: { condition: service_healthy }

fleet-server:
image: docker.elastic.co/beats/elastic-agent:8.0.0-2f347a19-SNAPSHOT
image: docker.elastic.co/beats/elastic-agent:8.0.0-af0b1af7-SNAPSHOT
ports:
- 8220:8220
healthcheck:
Expand Down
32 changes: 16 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ require (
github.com/dgraph-io/badger/v2 v2.2007.3-0.20201012072640-f5a7e0a1c83b
github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
github.com/dlclark/regexp2 v1.4.0 // indirect
github.com/dop251/goja v0.0.0-20211011172007-d99e4b8cbf48 // indirect
github.com/dop251/goja_nodejs v0.0.0-20210920152751-582170a1676b // indirect
github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06 // indirect
github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d // indirect
github.com/dustin/go-humanize v1.0.0
github.com/elastic/apm-server/approvaltest v0.0.0-00010101000000-000000000000
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20211014102705-568fd05e680b
github.com/elastic/beats/v7 v7.0.0-alpha2.0.20211027085525-624f6d1beaf3
github.com/elastic/ecs v1.12.0
github.com/elastic/elastic-agent-client/v7 v7.0.0-20210922110810-e6f1f402a9ed // indirect
github.com/elastic/gmux v0.2.0
Expand All @@ -25,14 +25,14 @@ require (
github.com/elastic/go-ucfg v0.8.4-0.20200415140258-1232bd4774a6
github.com/fatih/color v1.13.0 // indirect
github.com/go-sourcemap/sourcemap v2.1.3+incompatible
github.com/gofrs/uuid v4.0.0+incompatible
github.com/gofrs/uuid v4.1.0+incompatible
github.com/gogo/protobuf v1.3.2
github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/golang-lru v0.5.4
github.com/jaegertracing/jaeger v1.25.0
github.com/jcchavezs/porto v0.3.0 // indirect
github.com/jcchavezs/porto v0.4.0 // indirect
github.com/josephspurrier/goversioninfo v1.3.0 // indirect
github.com/json-iterator/go v1.1.11
github.com/libp2p/go-reuseport v0.0.2
Expand All @@ -49,8 +49,6 @@ require (
github.com/spf13/cobra v1.2.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.7.0
github.com/tidwall/gjson v1.6.5
github.com/tidwall/sjson v1.1.1
github.com/urso/magetools v0.0.0-20200125210132-c2e338f92f3a // indirect
github.com/xeipuuv/gojsonschema v1.2.0
go.elastic.co/apm v1.14.0
Expand All @@ -66,14 +64,13 @@ require (
go.uber.org/zap v1.19.1
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/mod v0.5.1 // indirect
golang.org/x/net v0.0.0-20211013171255-e13a2654a71e
golang.org/x/net v0.0.0-20211020060615-d418f374d309
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20211013075003-97ac67df715c // indirect
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 // indirect
golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6
golang.org/x/tools v0.1.7
google.golang.org/genproto v0.0.0-20211013025323-ce878158c4d4 // indirect
google.golang.org/genproto v0.0.0-20211026145609-4688e4c4e024 // indirect
google.golang.org/grpc v1.41.0
gopkg.in/yaml.v2 v2.4.0
gotest.tools/gotestsum v1.7.0
howett.net/plist v0.0.0-20201203080718-1454fab16a06 // indirect
)
Expand Down Expand Up @@ -111,14 +108,14 @@ require (
github.com/elastic/go-lumber v0.1.0 // indirect
github.com/elastic/go-seccomp-bpf v1.2.0 // indirect
github.com/elastic/go-structform v0.0.9 // indirect
github.com/elastic/go-txfile v0.0.7 // indirect
github.com/elastic/go-txfile v0.0.8 // indirect
github.com/elastic/go-windows v1.0.1 // indirect
github.com/elastic/gosigar v0.14.1 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-logr/logr v0.4.0 // indirect
github.com/go-ole/go-ole v1.2.5 // indirect
github.com/gofrs/flock v0.7.2-0.20190320160742-5135e617513b // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
Expand Down Expand Up @@ -167,8 +164,10 @@ require (
github.com/shirou/gopsutil v3.21.7+incompatible // indirect
github.com/sirupsen/logrus v1.8.1 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/tidwall/match v1.0.3 // indirect
github.com/tidwall/pretty v1.0.2 // indirect
github.com/tidwall/gjson v1.9.3 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tidwall/sjson v1.1.1 // indirect
github.com/tklauser/go-sysconf v0.3.5 // indirect
github.com/tklauser/numcpus v0.2.2 // indirect
github.com/ugorji/go/codec v1.1.8 // indirect
Expand Down Expand Up @@ -200,6 +199,7 @@ require (
gopkg.in/jcmturner/goidentity.v3 v3.0.0 // indirect
gopkg.in/jcmturner/gokrb5.v7 v7.5.0 // indirect
gopkg.in/jcmturner/rpc.v1 v1.1.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/api v0.21.1 // indirect
k8s.io/apimachinery v0.21.1 // indirect
Expand Down
Loading

0 comments on commit b9a8578

Please sign in to comment.