Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport elastic-agent/pull/255 #31192

Merged
merged 2 commits into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
remove apm instrumentation code
  • Loading branch information
michel-laterman committed Apr 6, 2022
commit 9e2b82761383f1f0e142e08db55dbb9ae851c103
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"context"
"strings"

"go.elastic.co/apm"

"github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/errors"
"github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/artifact"
"github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/artifact/download"
Expand All @@ -23,11 +21,6 @@ import (
)

func (u *Upgrader) downloadArtifact(ctx context.Context, version, sourceURI string) (_ string, err error) {
span, ctx := apm.StartSpan(ctx, "downloadArtifact", "app.internal")
defer func() {
apm.CaptureError(ctx, err).Send()
span.End()
}()
// do not update source config
settings := *u.settings
if sourceURI != "" {
Expand Down
4 changes: 1 addition & 3 deletions x-pack/elastic-agent/pkg/agent/operation/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import (
"testing"
"time"

"go.elastic.co/apm/apmtest"

"github.com/elastic/beats/v7/libbeat/logp"
"github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/application/info"
"github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/configuration"
Expand Down Expand Up @@ -65,7 +63,7 @@ func getTestOperator(t *testing.T, downloadPath string, installPath string, p *a
if err != nil {
t.Fatal(err)
}
srv, err := server.New(l, "localhost:0", &ApplicationStatusHandler{}, apmtest.DiscardTracer)
srv, err := server.New(l, "localhost:0", &ApplicationStatusHandler{})
if err != nil {
t.Fatal(err)
}
Expand Down