From 88baaa42946f86352fc0aa2c53e0b7873f01efd2 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Wed, 12 Nov 2025 16:04:52 -0500 Subject: [PATCH 01/17] WIP --- go.mod | 3 + go.sum | 4 +- magefile.go | 5 +- pkg/testing/linux/linux.go | 2 +- .../ess/otel_log_as_filestream_test.go | 254 ++++++++++++++++++ 5 files changed, 264 insertions(+), 4 deletions(-) create mode 100644 testing/integration/ess/otel_log_as_filestream_test.go diff --git a/go.mod b/go.mod index 68514e76b27..b8cb7a9478c 100644 --- a/go.mod +++ b/go.mod @@ -245,6 +245,7 @@ require ( github.com/bitfield/gotestdox v0.2.2 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bmatcuk/doublestar/v4 v4.9.1 // indirect + github.com/brianvoe/gofakeit v3.18.0+incompatible // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/chai2010/gettext-go v1.0.2 // indirect github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect @@ -817,3 +818,5 @@ replace ( replace go.opentelemetry.io/otel/exporters/prometheus => go.opentelemetry.io/otel/exporters/prometheus v0.58.0 replace github.com/elastic/elastic-agent/internal/edot => ./internal/edot + +replace github.com/elastic/beats/v7 => github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251111203505-d2ceaf2b480c diff --git a/go.sum b/go.sum index 43bd3e292e1..2be07bc9f4c 100644 --- a/go.sum +++ b/go.sum @@ -325,6 +325,8 @@ github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/beevik/ntp v1.4.3 h1:PlbTvE5NNy4QHmA4Mg57n7mcFTmr1W1j3gcK7L1lqho= github.com/beevik/ntp v1.4.3/go.mod h1:Unr8Zg+2dRn7d8bHFuehIMSvvUYssHMxW3Q5Nx4RW5Q= +github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251111203505-d2ceaf2b480c h1:Yt/FBq/1RTBrSPTsDIudtuUllW8c7DSuI0JNLe3mwPo= +github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251111203505-d2ceaf2b480c/go.mod h1:6EJkPJL2/75SS7EV2KkoyUSbUXF4k+9x3onewkf3928= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -509,8 +511,6 @@ github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumpti github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption v1.1.0-elastic/go.mod h1:0vCBR1wgGwZeGmloJ+eCWIZF2S47grTXRzj2mftg2Nk= github.com/elastic/bayeux v1.0.5 h1:UceFq01ipmT3S8DzFK+uVAkbCdiPR0Bqei8qIGmUeY0= github.com/elastic/bayeux v1.0.5/go.mod h1:CSI4iP7qeo5MMlkznGvYKftp8M7qqP/3nzmVZoXHY68= -github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251110163541-f1267b89f0f3 h1:ETrXzf1vahBPAIxKz1ZV+FbI1hqfpbtmKXmN++I+pgE= -github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251110163541-f1267b89f0f3/go.mod h1:6EJkPJL2/75SS7EV2KkoyUSbUXF4k+9x3onewkf3928= github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae h1:OiShmbWAyGU0MS0ADJWr1/QgeLIZliMk9xsrFicR3/s= github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae/go.mod h1:D2IckZVXARugvikE4fv1glvaJMohKSZRzrPsxCjo9O0= github.com/elastic/elastic-agent-autodiscover v0.10.0 h1:WJ4zl9uSfk1kHmn2B/0byQBLIL607Zt4LNfOgV7+XN0= diff --git a/magefile.go b/magefile.go index 2df7c19fe3c..97fecd9cda5 100644 --- a/magefile.go +++ b/magefile.go @@ -2255,7 +2255,10 @@ func (Integration) Local(ctx context.Context, testName string) error { // run the integration tests but only run test that can run locally params := devtools.DefaultGoTestIntegrationArgs() params.Tags = append(params.Tags, "local") - params.Packages = []string{"github.com/elastic/elastic-agent/testing/integration"} + params.ExtraFlags = append(params.ExtraFlags, "-test.count", "1") + params.Packages = []string{ + "github.com/elastic/elastic-agent/testing/integration/ess", + } var goTestFlags []string rawTestFlags := os.Getenv("GOTEST_FLAGS") diff --git a/pkg/testing/linux/linux.go b/pkg/testing/linux/linux.go index c38f53dc521..4ee388db81f 100644 --- a/pkg/testing/linux/linux.go +++ b/pkg/testing/linux/linux.go @@ -81,7 +81,7 @@ func linuxCopy(ctx context.Context, sshClient ssh.SSHClient, logger common.Logge err, stdout, stderr) } - stdOut, errOut, err := sshClient.Exec(ctx, "unzip", []string{destRepoName, "-d", "agent"}, nil) + stdOut, errOut, err := sshClient.Exec(ctx, "unzip", []string{"-o", destRepoName, "-d", "agent"}, nil) if err != nil { return fmt.Errorf("failed to unzip %s to agent directory: %w (stdout: %s, stderr: %s)", destRepoName, err, stdOut, errOut) } diff --git a/testing/integration/ess/otel_log_as_filestream_test.go b/testing/integration/ess/otel_log_as_filestream_test.go new file mode 100644 index 00000000000..432546226e6 --- /dev/null +++ b/testing/integration/ess/otel_log_as_filestream_test.go @@ -0,0 +1,254 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + +//go:build integration + +package ess + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "os" + "path/filepath" + "sync" + "testing" + "text/template" + "time" + + libbeatinteg "github.com/elastic/beats/v7/libbeat/tests/integration" + "github.com/elastic/elastic-agent-libs/testing/estools" + aTesting "github.com/elastic/elastic-agent/pkg/testing" + "github.com/elastic/elastic-agent/pkg/testing/define" + "github.com/elastic/elastic-agent/pkg/testing/tools/testcontext" + "github.com/elastic/elastic-agent/testing/integration" + "github.com/stretchr/testify/require" +) + +func TestFilebeatReceiverLogAsFilestream(t *testing.T) { + info := define.Require(t, define.Requirements{ + Stack: &define.Stack{}, + Group: integration.Default, + Local: true, + OS: []define.OS{ + // {Type: define.Windows}, + {Type: define.Linux}, + // {Type: define.Darwin}, + }, + }) + + type otelConfigOptions struct { + Message string + Output string + HomeDir string + LogFilepath string + AsFilestream bool + ESApiKey string + ESEndpoint string + Namespace string + } + + tmpDir := t.TempDir() + tmpDir = os.TempDir() + logFilepath := filepath.Join(tmpDir, "log.log") + numEvents := 50 + libbeatinteg.WriteLogFile(t, logFilepath, numEvents, false) + + exporterOutputPath := filepath.Join(tmpDir, "output.json") + t.Cleanup(func() { + if t.Failed() { + contents, err := os.ReadFile(exporterOutputPath) + if err != nil { + t.Logf("No exporter output file") + return + } + t.Logf("Otel output file path: %s", exporterOutputPath) + t.Logf("Contents of exporter output file:\n%s\n", string(contents)) + } + }) + otelConfigPath := filepath.Join(tmpDir, "otel.yml") + otelConfigTemplate := `receivers: + filebeatreceiver: + filebeat: + inputs: + - type: log + id: foo + allow_deprecated_use: true + paths: + {{.LogFilepath}} + fields: + find_me: {{.Namespace}} + output: + otelconsumer: + logging: + level: debug + selectors: + - '*' + path.home: {{.HomeDir}} + features.log_input_run_as_filestream.enabled: {{.AsFilestream}} + +exporters: + elasticsearch: + api_key: {{.ESApiKey}} + endpoint: {{.ESEndpoint}} + mapping: + mode: none + +service: + pipelines: + logs: + receivers: [filebeatreceiver] + exporters: [elasticsearch] +` + + esClient := info.ESClient + esApiKey, err := createESApiKey(esClient) + require.NoError(t, err, "failed to get api key") + require.True(t, len(esApiKey.Encoded) > 1, "api key is invalid %q", esApiKey) + esHost, err := integration.GetESHost() + require.NoError(t, err, "failed to get ES host") + require.True(t, len(esHost) > 0) + + var otelConfigBuffer bytes.Buffer + require.NoError(t, + template.Must( + template.New("otelConfig"). + Parse(otelConfigTemplate)). + Execute( + &otelConfigBuffer, + otelConfigOptions{ + Output: exporterOutputPath, + HomeDir: tmpDir, + LogFilepath: logFilepath, + ESApiKey: esApiKey.Encoded, + ESEndpoint: esHost, + Namespace: info.Namespace, + })) + require.NoError(t, os.WriteFile(otelConfigPath, otelConfigBuffer.Bytes(), 0o600)) + t.Cleanup(func() { + if t.Failed() { + contents, err := os.ReadFile(otelConfigPath) + if err != nil { + t.Logf("no otel config file") + return + } + t.Logf("Contents of otel config file:\n%s\n", string(contents)) + } + }) + + fixture, err := define.NewFixtureFromLocalBuild( + t, + define.Version(), + aTesting.WithAdditionalArgs([]string{"--config", otelConfigPath})) + require.NoError(t, err) + + ctx, cancel := testcontext.WithDeadline(t, context.Background(), time.Now().Add(1*time.Minute)) + defer cancel() + err = fixture.Prepare(ctx, fakeComponent) + require.NoError(t, err) + + var fixtureWg sync.WaitGroup + fixtureWg.Add(1) + go func() { + defer fixtureWg.Done() + err = fixture.RunOtelWithClient(ctx) + }() + + require.Eventually(t, + func() bool { + findCtx, findCancel := context.WithTimeout(context.Background(), 10*time.Second) + defer findCancel() + + docs, err := estools.GetLogsForIndexWithContext( + findCtx, + esClient, + ".ds-logs-generic-default*", + map[string]any{ + "Body.fields.find_me": info.Namespace, + }) + require.NoError(t, err) + + return docs.Hits.Total.Value == numEvents + }, + 30*time.Second, 1*time.Second, + "Expected %v logs", numEvents) + + cancel() + fixtureWg.Wait() + require.True( + t, + err == nil || errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded), + "Retrieved unexpected error: %s", + err.Error()) + + //================================================== Run again + // t.Log("================================================== RUNNING AGAIN") +} + +func countOtelEvents(t *testing.T, path string) int { + data, err := os.ReadFile(path) + if err != nil { + if errors.Is(err, os.ErrNotExist) { + return 0 + } + + // t.Logf("cannot read output file: %s", err) + return -1 + } + + out := otelOutput{} + if err := json.Unmarshal(data, &out); err != nil { + // t.Logf("cannot unmarshal data: %s", err) + return -1 + } + + count := 0 + for _, rlogs := range out.ResourceLogs { + for _, slogs := range rlogs.ScopeLogs { + count += len(slogs.LogRecords) + // for _, _ := range slogs.LogRecords { + // count++ + // // t.Logf("data: %s", lr.Body.KvlistValue.Values) + // } + } + } + + return count +} + +type otelOutput struct { + ResourceLogs []ResourceLogs `json:"resourceLogs"` +} + +type ResourceLogs struct { + ScopeLogs []ScopeLogs `json:"scopeLogs"` +} + +type ScopeLogs struct { + LogRecords []LogRecords `json:"logRecords"` +} + +type LogRecords struct { + TimeUnixNano string `json:"timeUnixNano"` + ObservedTimeUnixNano string `json:"observedTimeUnixNano"` + Body Body `json:"body"` +} + +type Body struct { + KvlistValue KvlistValue `json:"kvlistValue"` +} + +type KvlistValue struct { + Values []Values `json:"values"` +} + +type Values struct { + Key string `json:"key"` + Value Value `json:"value"` +} + +type Value struct { + StringValue string `json:"stringValue"` +} From bfdbb8c7d2cf12a627ff5eb51e5c6b1d807b6bcd Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Wed, 12 Nov 2025 16:58:45 -0500 Subject: [PATCH 02/17] [WIP] Log as json in file --- .../ess/otel_log_as_filestream_test.go | 115 ++++++++++++------ 1 file changed, 80 insertions(+), 35 deletions(-) diff --git a/testing/integration/ess/otel_log_as_filestream_test.go b/testing/integration/ess/otel_log_as_filestream_test.go index 432546226e6..dbc8609a91e 100644 --- a/testing/integration/ess/otel_log_as_filestream_test.go +++ b/testing/integration/ess/otel_log_as_filestream_test.go @@ -13,7 +13,6 @@ import ( "errors" "os" "path/filepath" - "sync" "testing" "text/template" "time" @@ -57,17 +56,18 @@ func TestFilebeatReceiverLogAsFilestream(t *testing.T) { libbeatinteg.WriteLogFile(t, logFilepath, numEvents, false) exporterOutputPath := filepath.Join(tmpDir, "output.json") - t.Cleanup(func() { - if t.Failed() { - contents, err := os.ReadFile(exporterOutputPath) - if err != nil { - t.Logf("No exporter output file") - return - } - t.Logf("Otel output file path: %s", exporterOutputPath) - t.Logf("Contents of exporter output file:\n%s\n", string(contents)) - } - }) + // t.Cleanup(func() { + // if t.Failed() { + // contents, err := os.ReadFile(exporterOutputPath) + // if err != nil { + // t.Logf("No exporter output file") + // return + // } + // t.Logf("Otel output file path: %s", exporterOutputPath) + // t.Logf("Contents of exporter output file:\n%s\n", string(contents)) + // } + // }) + otelConfigPath := filepath.Join(tmpDir, "otel.yml") otelConfigTemplate := `receivers: filebeatreceiver: @@ -101,6 +101,11 @@ service: logs: receivers: [filebeatreceiver] exporters: [elasticsearch] + telemetry: + logs: + level: DEBUG + encoding: json + disable_stacktrace: true ` esClient := info.ESClient @@ -127,16 +132,16 @@ service: Namespace: info.Namespace, })) require.NoError(t, os.WriteFile(otelConfigPath, otelConfigBuffer.Bytes(), 0o600)) - t.Cleanup(func() { - if t.Failed() { - contents, err := os.ReadFile(otelConfigPath) - if err != nil { - t.Logf("no otel config file") - return - } - t.Logf("Contents of otel config file:\n%s\n", string(contents)) - } - }) + // t.Cleanup(func() { + // if t.Failed() { + // contents, err := os.ReadFile(otelConfigPath) + // if err != nil { + // t.Logf("no otel config file") + // return + // } + // t.Logf("Contents of otel config file:\n%s\n", string(contents)) + // } + // }) fixture, err := define.NewFixtureFromLocalBuild( t, @@ -149,12 +154,43 @@ service: err = fixture.Prepare(ctx, fakeComponent) require.NoError(t, err) - var fixtureWg sync.WaitGroup - fixtureWg.Add(1) - go func() { - defer fixtureWg.Done() - err = fixture.RunOtelWithClient(ctx) - }() + cmd, err := fixture.PrepareAgentCommand( + ctx, + []string{"otel", "--config", otelConfigPath, "-e"}, + ) + require.NoError(t, err) + + // var fixtureWg sync.WaitGroup + // fixtureWg.Add(1) + // go func() { + // defer fixtureWg.Done() + // err = fixture.RunOtelWithClient(ctx) + + f, err := os.CreateTemp("", t.Name()) + if err != nil { + t.Fatalf("cannot create file: %s", err) + } + + t.Cleanup(func() { + t.Logf("Output file: %s", f.Name()) + }) + + defer f.Close() + + cmd.Stderr = f + cmd.Stdout = f + + if err := cmd.Start(); err != nil { + t.Errorf("cannot start Elastic Agent in OTel mode: %s", err) + } + + // out, err := cmd.CombinedOutput() + // if err != nil { + // t.Errorf("combined output returned error: %#v", err) + // } + // fmt.Println(string(out)) + + // }() require.Eventually(t, func() bool { @@ -175,13 +211,22 @@ service: 30*time.Second, 1*time.Second, "Expected %v logs", numEvents) - cancel() - fixtureWg.Wait() - require.True( - t, - err == nil || errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded), - "Retrieved unexpected error: %s", - err.Error()) + t.Log("==================== Sending Interrupt signal") + if err := cmd.Process.Signal(os.Interrupt); err != nil { + t.Fatalf("cannot send interrupt signal to Elastic Agent: %s", err) + } + + t.Log("==================== Waiting process to return") + if err := cmd.Wait(); err != nil { + t.Fatalf("Elastic Agent exited with an error: %s", err) + } + // cancel() + // fixtureWg.Wait() + // require.True( + // t, + // err == nil || errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded), + // "Retrieved unexpected error: %s", + // err) //================================================== Run again // t.Log("================================================== RUNNING AGAIN") From 7598808d0c56c99aa21c11b9a012bcd50abfa903 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Wed, 12 Nov 2025 17:05:22 -0500 Subject: [PATCH 03/17] Search and keep log file --- testing/integration/ess/logfile.go | 154 ++++++++++++++++++ .../ess/otel_log_as_filestream_test.go | 39 +---- 2 files changed, 163 insertions(+), 30 deletions(-) create mode 100644 testing/integration/ess/logfile.go diff --git a/testing/integration/ess/logfile.go b/testing/integration/ess/logfile.go new file mode 100644 index 00000000000..7241912c2be --- /dev/null +++ b/testing/integration/ess/logfile.go @@ -0,0 +1,154 @@ +package ess + +import ( + "bufio" + "errors" + "fmt" + "io" + "os" + "path/filepath" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// LogFile wraps a *logp.LogFile and makes it more suitable for tests. +// Key features: +// - All logs are saved on a single temporary log file +// - On failures, the log file is kept and its path printed +// - Methods to search and wait for log entries are provided, +// they keep track of the offset, ensuring ordering when +// when searching for logs +type LogFile struct { + *os.File + offset int64 + KeepLogFile bool +} + +func NewLogFile(t testing.TB, path ...string) *LogFile { + dir := filepath.Join(path...) + if dir == "" { + dir = os.TempDir() + } + + if err := os.MkdirAll(dir, 0o750); err != nil { + t.Fatalf("cannot create folder for logs: %s", err) + } + + f, err := os.CreateTemp(dir, "a-log-file-*.log") + if err != nil { + t.Fatalf("cannot create log file: %s", err) + } + + lf := &LogFile{ + File: f, + } + + t.Cleanup(func() { + if err := f.Sync(); err != nil { + t.Logf("cannot sync log file: %s", err) + } + + if err := f.Close(); err != nil { + t.Logf("cannot close log file: %s", err) + } + + // If the test failed, print the log file location, + // otherwise remove it. + if t.Failed() || lf.KeepLogFile { + t.Logf("Full logs written to %s", f.Name()) + return + } + + if err := os.Remove(f.Name()); err != nil { + t.Logf("could not remove temporary log file: %s", err) + } + }) + + return lf +} + +// WaitLogsContains waits for the specified string s to be present in the logs within +// the given timeout duration and fails the test if s is not found. +// It keeps track of the log file offset, reading only new lines. Each +// subsequent call to WaitLogsContains will only check logs not yet evaluated. +// msgAndArgs should be a format string and arguments that will be printed +// if the logs are not found, providing additional context for debugging. +func (l *LogFile) WaitLogsContains(t testing.TB, s string, timeout time.Duration, msgAndArgs ...any) { + t.Helper() + require.EventuallyWithT( + t, + func(c *assert.CollectT) { + found, err := l.FindInLogs(s) + if err != nil { + c.Errorf("cannot check the log file: %s", err) + return + } + + if !found { + c.Errorf("did not find '%s' in the logs", s) + } + }, + timeout, + 100*time.Millisecond, + msgAndArgs...) +} + +// LogContains searches for str in the log file keeping track of the +// offset. If there is any issue reading the log file, then t.Fatalf is called, +// if str is not present in the logs, t.Errorf is called. +func (l *LogFile) LogContains(t testing.TB, str string) { + t.Helper() + found, err := l.FindInLogs(str) + if err != nil { + t.Fatalf("cannot read log file: %s", err) + } + + if !found { + t.Errorf("'%s' not found in logs", str) + } +} + +// FindInLogs searches for str in the log file keeping track of the offset. +// It returns true if str is found in the logs. If there are any errors, +// it returns false and the error +func (l *LogFile) FindInLogs(str string) (bool, error) { + // Open the file again so we can seek and not interfere with + // the logger writing to it. + f, err := os.Open(l.Name()) + if err != nil { + return false, fmt.Errorf("cannot open log file for reading: %w", err) + } + + if _, err := f.Seek(l.offset, io.SeekStart); err != nil { + return false, fmt.Errorf("cannot seek log file: %w", err) + } + + r := bufio.NewReader(f) + for { + data, err := r.ReadBytes('\n') + line := string(data) + l.offset += int64(len(data)) + + if err != nil { + if !errors.Is(err, io.EOF) { + return false, fmt.Errorf("error reading log file '%s': %w", l.Name(), err) + } + break + } + + if strings.Contains(line, str) { + return true, nil + } + } + + return false, nil +} + +// ResetOffset resets the log file offset +func (l *LogFile) ResetOffset() { + l.offset = 0 +} diff --git a/testing/integration/ess/otel_log_as_filestream_test.go b/testing/integration/ess/otel_log_as_filestream_test.go index dbc8609a91e..6e03dc15b8d 100644 --- a/testing/integration/ess/otel_log_as_filestream_test.go +++ b/testing/integration/ess/otel_log_as_filestream_test.go @@ -160,22 +160,8 @@ service: ) require.NoError(t, err) - // var fixtureWg sync.WaitGroup - // fixtureWg.Add(1) - // go func() { - // defer fixtureWg.Done() - // err = fixture.RunOtelWithClient(ctx) - - f, err := os.CreateTemp("", t.Name()) - if err != nil { - t.Fatalf("cannot create file: %s", err) - } - - t.Cleanup(func() { - t.Logf("Output file: %s", f.Name()) - }) - - defer f.Close() + f := NewLogFile(t) + f.KeepLogFile = true cmd.Stderr = f cmd.Stdout = f @@ -184,13 +170,12 @@ service: t.Errorf("cannot start Elastic Agent in OTel mode: %s", err) } - // out, err := cmd.CombinedOutput() - // if err != nil { - // t.Errorf("combined output returned error: %#v", err) - // } - // fmt.Println(string(out)) - - // }() + f.WaitLogsContains( + t, + "Log input running as Log input", + 20*time.Second, + "Log input did not start as Log input", + ) require.Eventually(t, func() bool { @@ -220,16 +205,10 @@ service: if err := cmd.Wait(); err != nil { t.Fatalf("Elastic Agent exited with an error: %s", err) } - // cancel() - // fixtureWg.Wait() - // require.True( - // t, - // err == nil || errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded), - // "Retrieved unexpected error: %s", - // err) //================================================== Run again // t.Log("================================================== RUNNING AGAIN") + } func countOtelEvents(t *testing.T, path string) int { From 6924117e6521e13a506f6ae08542ea494959b8a2 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Wed, 12 Nov 2025 17:56:42 -0500 Subject: [PATCH 04/17] Refactor --- testing/integration/ess/logfile.go | 4 + .../ess/otel_log_as_filestream_test.go | 238 ++++++++---------- 2 files changed, 111 insertions(+), 131 deletions(-) diff --git a/testing/integration/ess/logfile.go b/testing/integration/ess/logfile.go index 7241912c2be..0d4d299e94e 100644 --- a/testing/integration/ess/logfile.go +++ b/testing/integration/ess/logfile.go @@ -1,3 +1,7 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License 2.0; +// you may not use this file except in compliance with the Elastic License 2.0. + package ess import ( diff --git a/testing/integration/ess/otel_log_as_filestream_test.go b/testing/integration/ess/otel_log_as_filestream_test.go index 6e03dc15b8d..abdc92e35fb 100644 --- a/testing/integration/ess/otel_log_as_filestream_test.go +++ b/testing/integration/ess/otel_log_as_filestream_test.go @@ -9,21 +9,21 @@ package ess import ( "bytes" "context" - "encoding/json" - "errors" "os" + "os/exec" "path/filepath" "testing" "text/template" "time" + "github.com/stretchr/testify/require" + libbeatinteg "github.com/elastic/beats/v7/libbeat/tests/integration" "github.com/elastic/elastic-agent-libs/testing/estools" - aTesting "github.com/elastic/elastic-agent/pkg/testing" + atesting "github.com/elastic/elastic-agent/pkg/testing" "github.com/elastic/elastic-agent/pkg/testing/define" "github.com/elastic/elastic-agent/pkg/testing/tools/testcontext" "github.com/elastic/elastic-agent/testing/integration" - "github.com/stretchr/testify/require" ) func TestFilebeatReceiverLogAsFilestream(t *testing.T) { @@ -38,17 +38,6 @@ func TestFilebeatReceiverLogAsFilestream(t *testing.T) { }, }) - type otelConfigOptions struct { - Message string - Output string - HomeDir string - LogFilepath string - AsFilestream bool - ESApiKey string - ESEndpoint string - Namespace string - } - tmpDir := t.TempDir() tmpDir = os.TempDir() logFilepath := filepath.Join(tmpDir, "log.log") @@ -56,17 +45,17 @@ func TestFilebeatReceiverLogAsFilestream(t *testing.T) { libbeatinteg.WriteLogFile(t, logFilepath, numEvents, false) exporterOutputPath := filepath.Join(tmpDir, "output.json") - // t.Cleanup(func() { - // if t.Failed() { - // contents, err := os.ReadFile(exporterOutputPath) - // if err != nil { - // t.Logf("No exporter output file") - // return - // } - // t.Logf("Otel output file path: %s", exporterOutputPath) - // t.Logf("Contents of exporter output file:\n%s\n", string(contents)) - // } - // }) + t.Cleanup(func() { + if t.Failed() { + contents, err := os.ReadFile(exporterOutputPath) + if err != nil { + t.Logf("No exporter output file") + return + } + t.Logf("Otel output file path: %s", exporterOutputPath) + t.Logf("Contents of exporter output file:\n%s\n", string(contents)) + } + }) otelConfigPath := filepath.Join(tmpDir, "otel.yml") otelConfigTemplate := `receivers: @@ -116,60 +105,28 @@ service: require.NoError(t, err, "failed to get ES host") require.True(t, len(esHost) > 0) - var otelConfigBuffer bytes.Buffer - require.NoError(t, - template.Must( - template.New("otelConfig"). - Parse(otelConfigTemplate)). - Execute( - &otelConfigBuffer, - otelConfigOptions{ - Output: exporterOutputPath, - HomeDir: tmpDir, - LogFilepath: logFilepath, - ESApiKey: esApiKey.Encoded, - ESEndpoint: esHost, - Namespace: info.Namespace, - })) - require.NoError(t, os.WriteFile(otelConfigPath, otelConfigBuffer.Bytes(), 0o600)) - // t.Cleanup(func() { - // if t.Failed() { - // contents, err := os.ReadFile(otelConfigPath) - // if err != nil { - // t.Logf("no otel config file") - // return - // } - // t.Logf("Contents of otel config file:\n%s\n", string(contents)) - // } - // }) - - fixture, err := define.NewFixtureFromLocalBuild( - t, - define.Version(), - aTesting.WithAdditionalArgs([]string{"--config", otelConfigPath})) - require.NoError(t, err) - ctx, cancel := testcontext.WithDeadline(t, context.Background(), time.Now().Add(1*time.Minute)) defer cancel() - err = fixture.Prepare(ctx, fakeComponent) - require.NoError(t, err) - cmd, err := fixture.PrepareAgentCommand( - ctx, - []string{"otel", "--config", otelConfigPath, "-e"}, - ) + fixture, err := define.NewFixtureFromLocalBuild( + t, + define.Version()) require.NoError(t, err) f := NewLogFile(t) f.KeepLogFile = true - cmd.Stderr = f - cmd.Stdout = f - - if err := cmd.Start(); err != nil { - t.Errorf("cannot start Elastic Agent in OTel mode: %s", err) + cfg := map[string]any{ + "Output": exporterOutputPath, + "HomeDir": tmpDir, + "LogFilepath": logFilepath, + "ESApiKey": esApiKey.Encoded, + "ESEndpoint": esHost, + "Namespace": info.Namespace, + "AsFilestream": false, } + cmd := start(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, f.File) f.WaitLogsContains( t, "Log input running as Log input", @@ -196,83 +153,102 @@ service: 30*time.Second, 1*time.Second, "Expected %v logs", numEvents) - t.Log("==================== Sending Interrupt signal") - if err := cmd.Process.Signal(os.Interrupt); err != nil { - t.Fatalf("cannot send interrupt signal to Elastic Agent: %s", err) - } - - t.Log("==================== Waiting process to return") - if err := cmd.Wait(); err != nil { - t.Fatalf("Elastic Agent exited with an error: %s", err) - } + stop(t, cmd, f) //================================================== Run again - // t.Log("================================================== RUNNING AGAIN") + t.Log("================================================== RUNNING AGAIN") + cmd = start(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, f.File) -} + t.Log("==================== Waiting for the second start") + f.WaitLogsContains( + t, + "Log input running as Log input", + 20*time.Second, + "Log input did not start as Log input", + ) -func countOtelEvents(t *testing.T, path string) int { - data, err := os.ReadFile(path) - if err != nil { - if errors.Is(err, os.ErrNotExist) { - return 0 - } + // Ensure no new data has been added + f.WaitLogsContains( + t, + "File didn't change: /tmp/log.log", + 20*time.Second, + "did not reach EOF") - // t.Logf("cannot read output file: %s", err) - return -1 - } + stop(t, cmd, f) - out := otelOutput{} - if err := json.Unmarshal(data, &out); err != nil { - // t.Logf("cannot unmarshal data: %s", err) - return -1 - } + cfg["AsFilestream"] = true + cmd = start(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, f.File) + t.Log("==================== Waiting for the third start") + f.WaitLogsContains( + t, + "Log input running as Filestream input", + 20*time.Second, + "Log input did not start as Filestream input", + ) - count := 0 - for _, rlogs := range out.ResourceLogs { - for _, slogs := range rlogs.ScopeLogs { - count += len(slogs.LogRecords) - // for _, _ := range slogs.LogRecords { - // count++ - // // t.Logf("data: %s", lr.Body.KvlistValue.Values) - // } - } - } + f.WaitLogsContains( + t, + "Input 'filestream' starting", + 20*time.Second, + "Filestream did not start", + ) - return count -} + f.WaitLogsContains( + t, + "End of file reached: /tmp/log.log; Backoff now.", + 20*time.Second, + "Filestream did not reach EOF") -type otelOutput struct { - ResourceLogs []ResourceLogs `json:"resourceLogs"` + stop(t, cmd, f) } -type ResourceLogs struct { - ScopeLogs []ScopeLogs `json:"scopeLogs"` -} +func start( + t *testing.T, + ctx context.Context, + otelConfigTemplate string, + otelConfigPath string, + cfg map[string]any, + fixture *atesting.Fixture, + f *os.File) *exec.Cmd { -type ScopeLogs struct { - LogRecords []LogRecords `json:"logRecords"` -} + otelConfigBuffer := bytes.Buffer{} + require.NoError(t, + template.Must( + template.New("otelConfig"). + Parse(otelConfigTemplate)). + Execute( + &otelConfigBuffer, + cfg)) + require.NoError(t, os.WriteFile(otelConfigPath, otelConfigBuffer.Bytes(), 0o600)) -type LogRecords struct { - TimeUnixNano string `json:"timeUnixNano"` - ObservedTimeUnixNano string `json:"observedTimeUnixNano"` - Body Body `json:"body"` -} + t.Log("================================================== Start starting") -type Body struct { - KvlistValue KvlistValue `json:"kvlistValue"` -} + cmd, err := fixture.PrepareAgentCommand( + ctx, + []string{"otel", "--config", otelConfigPath}, + ) + require.NoError(t, err) -type KvlistValue struct { - Values []Values `json:"values"` -} + cmd.Stderr = f + cmd.Stdout = f + + if err := cmd.Start(); err != nil { + t.Errorf("cannot start Elastic Agent in OTel mode: %s", err) + } -type Values struct { - Key string `json:"key"` - Value Value `json:"value"` + return cmd } -type Value struct { - StringValue string `json:"stringValue"` +func stop(t *testing.T, cmd *exec.Cmd, f *LogFile) { + t.Log("==================== Sending Interrupt signal") + if err := cmd.Process.Signal(os.Interrupt); err != nil { + t.Fatalf("cannot send interrupt signal to Elastic Agent: %s", err) + } + + t.Log("==================== Waiting process to return") + if err := cmd.Wait(); err != nil { + t.Fatalf("Elastic Agent exited with an error: %s", err) + } + + f.WaitLogsContains(t, "Shutdown complete.", time.Second, "Filebeat Receiver didn't shutdown") } From da9267141eae5d09f8fe833932d8d0a8b32d06f6 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Thu, 13 Nov 2025 12:04:42 -0500 Subject: [PATCH 05/17] Update Beats --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index b8cb7a9478c..dc525028e72 100644 --- a/go.mod +++ b/go.mod @@ -819,4 +819,4 @@ replace go.opentelemetry.io/otel/exporters/prometheus => go.opentelemetry.io/ote replace github.com/elastic/elastic-agent/internal/edot => ./internal/edot -replace github.com/elastic/beats/v7 => github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251111203505-d2ceaf2b480c +replace github.com/elastic/beats/v7 => github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251113165107-c90e90cb0a8c diff --git a/go.sum b/go.sum index 2be07bc9f4c..fa6e00cdffc 100644 --- a/go.sum +++ b/go.sum @@ -325,8 +325,8 @@ github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/beevik/ntp v1.4.3 h1:PlbTvE5NNy4QHmA4Mg57n7mcFTmr1W1j3gcK7L1lqho= github.com/beevik/ntp v1.4.3/go.mod h1:Unr8Zg+2dRn7d8bHFuehIMSvvUYssHMxW3Q5Nx4RW5Q= -github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251111203505-d2ceaf2b480c h1:Yt/FBq/1RTBrSPTsDIudtuUllW8c7DSuI0JNLe3mwPo= -github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251111203505-d2ceaf2b480c/go.mod h1:6EJkPJL2/75SS7EV2KkoyUSbUXF4k+9x3onewkf3928= +github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251113165107-c90e90cb0a8c h1:vKLWg1qZ7gmTpl07M/+FR5X6LwraPnRIjEdeci7dozs= +github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251113165107-c90e90cb0a8c/go.mod h1:w0cm93er1O75o3byGAt6vzfmAVdHJaco4/gFJ2DtnWo= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= From a5190a0cedc1a3741a65aec2fbe5e21aa70fe8b6 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Thu, 13 Nov 2025 12:49:04 -0500 Subject: [PATCH 06/17] Refactor createESApiKey --- .../integration/ess/beat_receivers_test.go | 16 ++--- .../ess/otel_log_as_filestream_test.go | 4 +- testing/integration/ess/otel_test.go | 60 +++++++++---------- 3 files changed, 33 insertions(+), 47 deletions(-) diff --git a/testing/integration/ess/beat_receivers_test.go b/testing/integration/ess/beat_receivers_test.go index 6e7e8fb8a6a..cd74c0937fc 100644 --- a/testing/integration/ess/beat_receivers_test.go +++ b/testing/integration/ess/beat_receivers_test.go @@ -188,9 +188,7 @@ func TestClassicAndReceiverAgentMonitoring(t *testing.T) { require.NoError(t, err, "error reading policy response") defer resp.Body.Close() - apiKeyResponse, err := createESApiKey(info.ESClient) - require.NoError(t, err, "failed to get api key") - require.True(t, len(apiKeyResponse.Encoded) > 1, "api key is invalid %q", apiKeyResponse) + apiKeyResponse := createESApiKey(t, info.ESClient) apiKey, err := getDecodedApiKey(apiKeyResponse) require.NoError(t, err, "error decoding api key") @@ -466,9 +464,7 @@ outputs: esEndpoint, err := integration.GetESHost() require.NoError(t, err, "error getting elasticsearch endpoint") - esApiKey, err := createESApiKey(info.ESClient) - require.NoError(t, err, "error creating API key") - require.True(t, len(esApiKey.Encoded) > 1, "api key is invalid %q", esApiKey) + esApiKey := createESApiKey(t, info.ESClient) beatsApiKey, err := base64.StdEncoding.DecodeString(esApiKey.Encoded) require.NoError(t, err, "error decoding api key") @@ -1162,9 +1158,7 @@ func TestSensitiveLogsESExporter(t *testing.T) { } esEndpoint, err := integration.GetESHost() require.NoError(t, err, "error getting elasticsearch endpoint") - esApiKey, err := createESApiKey(info.ESClient) - require.NoError(t, err, "error creating API key") - require.True(t, len(esApiKey.Encoded) > 1, "api key is invalid %q", esApiKey) + esApiKey := createESApiKey(t, info.ESClient) decodedApiKey, err := getDecodedApiKey(esApiKey) require.NoError(t, err) @@ -1345,9 +1339,7 @@ func TestSensitiveIncludeSourceOnError(t *testing.T) { } esEndpoint, err := integration.GetESHost() require.NoError(t, err, "error getting elasticsearch endpoint") - esApiKey, err := createESApiKey(info.ESClient) - require.NoError(t, err, "error creating API key") - require.True(t, len(esApiKey.Encoded) > 1, "api key is invalid %q", esApiKey) + esApiKey := createESApiKey(t, info.ESClient) decodedApiKey, err := getDecodedApiKey(esApiKey) require.NoError(t, err) diff --git a/testing/integration/ess/otel_log_as_filestream_test.go b/testing/integration/ess/otel_log_as_filestream_test.go index abdc92e35fb..c23e4fb6b76 100644 --- a/testing/integration/ess/otel_log_as_filestream_test.go +++ b/testing/integration/ess/otel_log_as_filestream_test.go @@ -98,9 +98,7 @@ service: ` esClient := info.ESClient - esApiKey, err := createESApiKey(esClient) - require.NoError(t, err, "failed to get api key") - require.True(t, len(esApiKey.Encoded) > 1, "api key is invalid %q", esApiKey) + esApiKey := createESApiKey(t, esClient) esHost, err := integration.GetESHost() require.NoError(t, err, "failed to get ES host") require.True(t, len(esHost) > 0) diff --git a/testing/integration/ess/otel_test.go b/testing/integration/ess/otel_test.go index efaa6a5f0d8..91dceab99eb 100644 --- a/testing/integration/ess/otel_test.go +++ b/testing/integration/ess/otel_test.go @@ -524,9 +524,7 @@ func TestOtelLogsIngestion(t *testing.T) { esClient := info.ESClient require.NotNil(t, esClient) - esApiKey, err := createESApiKey(esClient) - require.NoError(t, err, "failed to get api key") - require.True(t, len(esApiKey.Encoded) > 1, "api key is invalid %q", esApiKey) + esApiKey := createESApiKey(t, esClient) logsIngestionConfig := logsIngestionConfigTemplate logsIngestionConfig = strings.ReplaceAll(logsIngestionConfig, "{{.ESApiKey}}", esApiKey.Encoded) @@ -642,9 +640,7 @@ func TestOtelAPMIngestion(t *testing.T) { require.True(t, len(esHost) > 0) esClient := info.ESClient - esApiKey, err := createESApiKey(esClient) - require.NoError(t, err, "failed to get api key") - require.True(t, len(esApiKey.APIKey) > 1, "api key is invalid %q", esApiKey) + esApiKey := createESApiKey(t, esClient) apmArgs := []string{ "run", @@ -753,8 +749,21 @@ func TestOtelAPMIngestion(t *testing.T) { apmFixtureWg.Wait() } -func createESApiKey(esClient *elasticsearch.Client) (estools.APIKeyResponse, error) { - return estools.CreateAPIKey(context.Background(), esClient, estools.APIKeyRequest{Name: "test-api-key", Expiration: "1d"}) +func createESApiKey(t *testing.T, esClient *elasticsearch.Client) estools.APIKeyResponse { + esApiKey, err := estools.CreateAPIKey( + t.Context(), + esClient, + estools.APIKeyRequest{Name: "test-api-key", Expiration: "1d"}, + ) + + require.NoError(t, err, "error creating API key") + require.Truef( + t, + len(esApiKey.APIKey) > 1 && len(esApiKey.Encoded) > 1, + "api key is invalid %q", + esApiKey) + + return esApiKey } // getDecodedApiKey returns a decoded API key appropriate for use in beats configurations. @@ -944,9 +953,8 @@ func TestOtelFBReceiverE2E(t *testing.T) { } esEndpoint, err := integration.GetESHost() require.NoError(t, err, "error getting elasticsearch endpoint") - esApiKey, err := createESApiKey(info.ESClient) - require.NoError(t, err, "error creating API key") - require.True(t, len(esApiKey.Encoded) > 1, "api key is invalid %q", esApiKey) + esApiKey := createESApiKey(t, info.ESClient) + index := "logs-integration-default" otelConfigTemplate := `receivers: filebeatreceiver: @@ -1094,9 +1102,7 @@ func TestOtelFilestreamInput(t *testing.T) { } esEndpoint, err := integration.GetESHost() require.NoError(t, err, "error getting elasticsearch endpoint") - esApiKey, err := createESApiKey(info.ESClient) - require.NoError(t, err, "error creating API key") - require.True(t, len(esApiKey.Encoded) > 1, "api key is invalid %q", esApiKey) + esApiKey := createESApiKey(t, info.ESClient) decodedApiKey, err := getDecodedApiKey(esApiKey) require.NoError(t, err) configTemplate := ` @@ -1239,9 +1245,7 @@ func TestOTelHTTPMetricsInput(t *testing.T) { } esEndpoint, err := integration.GetESHost() require.NoError(t, err, "error getting elasticsearch endpoint") - esApiKey, err := createESApiKey(info.ESClient) - require.NoError(t, err, "error creating API key") - require.True(t, len(esApiKey.Encoded) > 1, "api key is invalid %q", esApiKey) + esApiKey := createESApiKey(t, info.ESClient) decodedApiKey, err := getDecodedApiKey(esApiKey) require.NoError(t, err) configTemplate := ` @@ -1367,9 +1371,8 @@ func TestOtelMBReceiverE2E(t *testing.T) { } esEndpoint, err := integration.GetESHost() require.NoError(t, err, "error getting elasticsearch endpoint") - esApiKey, err := createESApiKey(info.ESClient) - require.NoError(t, err, "error creating API key") - require.True(t, len(esApiKey.Encoded) > 1, "api key is invalid %q", esApiKey) + esApiKey := createESApiKey(t, info.ESClient) + index := "logs-integration-default" otelConfigTemplate := `receivers: metricbeatreceiver: @@ -1524,9 +1527,7 @@ func TestHybridAgentE2E(t *testing.T) { } esEndpoint, err := integration.GetESHost() require.NoError(t, err, "error getting elasticsearch endpoint") - esApiKey, err := createESApiKey(info.ESClient) - require.NoError(t, err, "error creating API key") - require.True(t, len(esApiKey.Encoded) > 1, "api key is invalid %q", esApiKey) + esApiKey := createESApiKey(t, info.ESClient) configTemplate := `agent.logging.level: info agent.logging.to_stderr: true @@ -1786,9 +1787,8 @@ func TestFBOtelRestartE2E(t *testing.T) { } esEndpoint, err := integration.GetESHost() require.NoError(t, err, "error getting elasticsearch endpoint") - esApiKey, err := createESApiKey(info.ESClient) - require.NoError(t, err, "error creating API key") - require.True(t, len(esApiKey.Encoded) > 1, "api key is invalid %q", esApiKey) + esApiKey := createESApiKey(t, info.ESClient) + // Use a unique index to avoid conflicts with other parallel runners index := strings.ToLower("logs-generic-default-" + randStr(8)) otelConfigTemplate := `receivers: @@ -2005,9 +2005,7 @@ func TestOtelBeatsAuthExtension(t *testing.T) { } esEndpoint, err := integration.GetESHost() require.NoError(t, err, "error getting elasticsearch endpoint") - esApiKey, err := createESApiKey(info.ESClient) - require.NoError(t, err, "error creating API key") - require.True(t, len(esApiKey.Encoded) > 1, "api key is invalid %q", esApiKey) + esApiKey := createESApiKey(t, info.ESClient) index := "logs-integration-" + info.Namespace fixture, err := define.NewFixtureFromLocalBuild(t, define.Version()) @@ -2161,9 +2159,7 @@ func TestOtelBeatsAuthExtensionInvalidCertificates(t *testing.T) { } esEndpoint, err := integration.GetESHost() require.NoError(t, err, "error getting elasticsearch endpoint") - esApiKey, err := createESApiKey(info.ESClient) - require.NoError(t, err, "error creating API key") - require.True(t, len(esApiKey.Encoded) > 1, "api key is invalid %q", esApiKey) + esApiKey := createESApiKey(t, info.ESClient) index := "logs-integration-" + info.Namespace fixture, err := define.NewFixtureFromLocalBuild(t, define.Version()) From b3985e067b4a6272ab3c32c8849b329f08c06c3d Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Thu, 13 Nov 2025 18:04:49 -0500 Subject: [PATCH 07/17] Finish test --- testing/integration/common.go | 4 + testing/integration/ess/logfile.go | 2 +- .../ess/otel_log_as_filestream_test.go | 223 ++++++++++-------- 3 files changed, 133 insertions(+), 96 deletions(-) diff --git a/testing/integration/common.go b/testing/integration/common.go index 4874be40549..df80b3b21bf 100644 --- a/testing/integration/common.go +++ b/testing/integration/common.go @@ -7,6 +7,7 @@ package integration import ( + "errors" "fmt" "net/url" "os" @@ -20,6 +21,9 @@ import ( func GetESHost() (string, error) { fixedESHost := os.Getenv("ELASTICSEARCH_HOST") + if len(fixedESHost) == 0 { + return "", errors.New("ELASTICSEARCH_HOST cannot be empty") + } parsedES, err := url.Parse(fixedESHost) if err != nil { return "", err diff --git a/testing/integration/ess/logfile.go b/testing/integration/ess/logfile.go index 0d4d299e94e..08d5987016d 100644 --- a/testing/integration/ess/logfile.go +++ b/testing/integration/ess/logfile.go @@ -42,7 +42,7 @@ func NewLogFile(t testing.TB, path ...string) *LogFile { t.Fatalf("cannot create folder for logs: %s", err) } - f, err := os.CreateTemp(dir, "a-log-file-*.log") + f, err := os.CreateTemp(dir, "elastic-agent-*.ndjson") if err != nil { t.Fatalf("cannot create log file: %s", err) } diff --git a/testing/integration/ess/otel_log_as_filestream_test.go b/testing/integration/ess/otel_log_as_filestream_test.go index c23e4fb6b76..414516e22ab 100644 --- a/testing/integration/ess/otel_log_as_filestream_test.go +++ b/testing/integration/ess/otel_log_as_filestream_test.go @@ -12,52 +12,42 @@ import ( "os" "os/exec" "path/filepath" + "strings" "testing" "text/template" "time" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" libbeatinteg "github.com/elastic/beats/v7/libbeat/tests/integration" "github.com/elastic/elastic-agent-libs/testing/estools" + "github.com/elastic/elastic-agent/pkg/core/process" atesting "github.com/elastic/elastic-agent/pkg/testing" "github.com/elastic/elastic-agent/pkg/testing/define" "github.com/elastic/elastic-agent/pkg/testing/tools/testcontext" "github.com/elastic/elastic-agent/testing/integration" ) +// TestFilebeatReceiverLogAsFilestream test beats receivers as follow: +// 1. Runs Filebeat Receiver with the Log input +// 2. Ensures all events are ingested +// 3. Stops Filebeat Receiver +// 4. Starts Filebeat Receiver with the global feature flag enabled +// 5. Adds more data to the file +// 6. Ensures all data is ingested and no duplication happens func TestFilebeatReceiverLogAsFilestream(t *testing.T) { info := define.Require(t, define.Requirements{ Stack: &define.Stack{}, Group: integration.Default, Local: true, OS: []define.OS{ - // {Type: define.Windows}, + {Type: define.Windows}, {Type: define.Linux}, - // {Type: define.Darwin}, + {Type: define.Darwin}, }, }) - tmpDir := t.TempDir() - tmpDir = os.TempDir() - logFilepath := filepath.Join(tmpDir, "log.log") - numEvents := 50 - libbeatinteg.WriteLogFile(t, logFilepath, numEvents, false) - - exporterOutputPath := filepath.Join(tmpDir, "output.json") - t.Cleanup(func() { - if t.Failed() { - contents, err := os.ReadFile(exporterOutputPath) - if err != nil { - t.Logf("No exporter output file") - return - } - t.Logf("Otel output file path: %s", exporterOutputPath) - t.Logf("Contents of exporter output file:\n%s\n", string(contents)) - } - }) - - otelConfigPath := filepath.Join(tmpDir, "otel.yml") otelConfigTemplate := `receivers: filebeatreceiver: filebeat: @@ -97,110 +87,152 @@ service: disable_stacktrace: true ` - esClient := info.ESClient - esApiKey := createESApiKey(t, esClient) + waitEventsInES := func(want int) { + t.Helper() + + require.EventuallyWithT(t, func(c *assert.CollectT) { + findCtx, findCancel := context.WithTimeout(t.Context(), 5*time.Second) + defer findCancel() + + docs, err := estools.GetLogsForIndexWithContext( + findCtx, + info.ESClient, + ".ds-logs-generic-default*", + map[string]any{ + "Body.fields.find_me": info.Namespace, + }) + require.NoError(c, err) + + got := docs.Hits.Total.Value + require.Equalf( + c, + want, + got, + "expecting %d events, got %d", + want, + got) + }, 30*time.Second, time.Second, "did not find the expected number of events") + } + + rootDir, err := filepath.Abs(filepath.Join("..", "..", "..", "build")) + if err != nil { + t.Fatalf("cannot get absolute path: %s", err) + } + + tmpDir := libbeatinteg.CreateTempDir(t, rootDir) + inputFilePath, err := filepath.Abs(filepath.Join(tmpDir, "log.log")) + inputFilePathStr := strings.ReplaceAll(inputFilePath, `\`, `\\`) + + libbeatinteg.WriteLogFile(t, inputFilePath, 50, false) + + esApiKey := createESApiKey(t, info.ESClient) esHost, err := integration.GetESHost() require.NoError(t, err, "failed to get ES host") - require.True(t, len(esHost) > 0) - ctx, cancel := testcontext.WithDeadline(t, context.Background(), time.Now().Add(1*time.Minute)) + ctx, cancel := testcontext.WithDeadline(t, t.Context(), time.Now().Add(2*time.Minute)) defer cancel() - fixture, err := define.NewFixtureFromLocalBuild( - t, - define.Version()) - require.NoError(t, err) - - f := NewLogFile(t) - f.KeepLogFile = true + agentLogFile := NewLogFile(t, tmpDir) + agentLogFile.KeepLogFile = true cfg := map[string]any{ - "Output": exporterOutputPath, "HomeDir": tmpDir, - "LogFilepath": logFilepath, + "LogFilepath": inputFilePath, "ESApiKey": esApiKey.Encoded, "ESEndpoint": esHost, "Namespace": info.Namespace, "AsFilestream": false, } - cmd := start(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, f.File) - f.WaitLogsContains( + fixture, err := define.NewFixtureFromLocalBuild( t, - "Log input running as Log input", + define.Version()) + require.NoError(t, err, "cannot create Elastic Agent fixture") + + // Start Filebeat receiver running the Log input + otelConfigPath := filepath.Join(tmpDir, "otel.yml") + cmd := StartEAOtel(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, agentLogFile.File) + agentLogFile.WaitLogsContains( + t, + "Log input (deprecated) running as Log input (deprecated)", 20*time.Second, "Log input did not start as Log input", ) - require.Eventually(t, - func() bool { - findCtx, findCancel := context.WithTimeout(context.Background(), 10*time.Second) - defer findCancel() - - docs, err := estools.GetLogsForIndexWithContext( - findCtx, - esClient, - ".ds-logs-generic-default*", - map[string]any{ - "Body.fields.find_me": info.Namespace, - }) - require.NoError(t, err) - - return docs.Hits.Total.Value == numEvents - }, - 30*time.Second, 1*time.Second, - "Expected %v logs", numEvents) + // Wait for all events to be ingested and stop Elastic Agent + waitEventsInES(50) + StopEAOtel(t, cmd, agentLogFile) - stop(t, cmd, f) + // Enable the feature flag and start Elastic Agent + cfg["AsFilestream"] = true + cmd = StartEAOtel(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, agentLogFile.File) - //================================================== Run again - t.Log("================================================== RUNNING AGAIN") - cmd = start(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, f.File) + // Ensure the Filesteam input starts + agentLogFile.WaitLogsContains( + t, + "Log input (deprecated) running as Filestream input", + 20*time.Second, + "Log input did not start as Filestream input", + ) - t.Log("==================== Waiting for the second start") - f.WaitLogsContains( + agentLogFile.WaitLogsContains( t, - "Log input running as Log input", + "Input 'filestream' starting", 20*time.Second, - "Log input did not start as Log input", + "Filestream did not start", ) - // Ensure no new data has been added - f.WaitLogsContains( + // Add 50 events to the file, it now contains 100 events + libbeatinteg.WriteLogFile(t, inputFilePath, 50, true) + + // "File /tmp/log.log has been updated" + agentLogFile.WaitLogsContains( + t, + "File "+inputFilePathStr+" has been updated", + 10*time.Second, + "Filestream did not detect change in the file") + + // Wait for Filestream to finish reading the file + agentLogFile.WaitLogsContains( t, - "File didn't change: /tmp/log.log", + "End of file reached: "+inputFilePathStr+"; Backoff now", 20*time.Second, - "did not reach EOF") + "Filestream did not reach EOF") - stop(t, cmd, f) + // Ensure all 100 events have been ingested and stop Elastic Agent + waitEventsInES(100) + StopEAOtel(t, cmd, agentLogFile) - cfg["AsFilestream"] = true - cmd = start(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, f.File) - t.Log("==================== Waiting for the third start") - f.WaitLogsContains( + // Start Elastic Agent again to ensure it is correctly tracking the state + cmd = StartEAOtel(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, agentLogFile.File) + agentLogFile.WaitLogsContains( t, - "Log input running as Filestream input", + "Log input (deprecated) running as Filestream input", 20*time.Second, "Log input did not start as Filestream input", ) - f.WaitLogsContains( + agentLogFile.WaitLogsContains( t, "Input 'filestream' starting", 20*time.Second, "Filestream did not start", ) - f.WaitLogsContains( + agentLogFile.WaitLogsContains( t, - "End of file reached: /tmp/log.log; Backoff now.", + "End of file reached: "+inputFilePathStr+"; Backoff now.", 20*time.Second, "Filestream did not reach EOF") - stop(t, cmd, f) + // Stop Elastic Agent + StopEAOtel(t, cmd, agentLogFile) + + // Ensure there was no data duplication + waitEventsInES(100) } -func start( +func StartEAOtel( t *testing.T, ctx context.Context, otelConfigTemplate string, @@ -217,36 +249,37 @@ func start( Execute( &otelConfigBuffer, cfg)) - require.NoError(t, os.WriteFile(otelConfigPath, otelConfigBuffer.Bytes(), 0o600)) - t.Log("================================================== Start starting") + require.NoError( + t, + os.WriteFile(otelConfigPath, otelConfigBuffer.Bytes(), 0o600), + "cannot write configuration file") cmd, err := fixture.PrepareAgentCommand( ctx, []string{"otel", "--config", otelConfigPath}, ) - require.NoError(t, err) + require.NoError(t, err, "cannot prepare Elastic Agent command") cmd.Stderr = f cmd.Stdout = f - if err := cmd.Start(); err != nil { - t.Errorf("cannot start Elastic Agent in OTel mode: %s", err) - } + require.NoError(t, cmd.Start(), "cannot start Elastic Agent in OTel mode") return cmd } -func stop(t *testing.T, cmd *exec.Cmd, f *LogFile) { - t.Log("==================== Sending Interrupt signal") - if err := cmd.Process.Signal(os.Interrupt); err != nil { - t.Fatalf("cannot send interrupt signal to Elastic Agent: %s", err) - } +func StopEAOtel(t *testing.T, cmd *exec.Cmd, f *LogFile) { + require.NoError( + t, + process.Terminate(cmd.Process), + "cannot send terminate signal to Elastic Agent") - t.Log("==================== Waiting process to return") - if err := cmd.Wait(); err != nil { - t.Fatalf("Elastic Agent exited with an error: %s", err) - } + require.NoError(t, cmd.Wait(), "Elastic Agent exited with an error") - f.WaitLogsContains(t, "Shutdown complete.", time.Second, "Filebeat Receiver didn't shutdown") + f.WaitLogsContains( + t, + "Shutdown complete.", + time.Second, + "Filebeat Receiver didn't shutdown") } From 8578f029fff50f309a351267057ab6f7730ef906 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Thu, 13 Nov 2025 18:11:15 -0500 Subject: [PATCH 08/17] update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c0dbe41b62b..59ecc700dfc 100644 --- a/.gitignore +++ b/.gitignore @@ -61,5 +61,6 @@ fleet.yml fleet.yml.lock fleet.yml.old pkg/component/fake/component/component +pkg/core/process/testsignal/testsignal internal/pkg/agent/install/testblocking/testblocking internal/pkg/otel/manager/testing/testing From 6918d3425cca1d9628587a037b0fc78e91f00784 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Thu, 13 Nov 2025 18:11:22 -0500 Subject: [PATCH 09/17] update test --- testing/integration/ess/otel_log_as_filestream_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testing/integration/ess/otel_log_as_filestream_test.go b/testing/integration/ess/otel_log_as_filestream_test.go index 414516e22ab..f56c800956f 100644 --- a/testing/integration/ess/otel_log_as_filestream_test.go +++ b/testing/integration/ess/otel_log_as_filestream_test.go @@ -185,11 +185,10 @@ service: // Add 50 events to the file, it now contains 100 events libbeatinteg.WriteLogFile(t, inputFilePath, 50, true) - // "File /tmp/log.log has been updated" agentLogFile.WaitLogsContains( t, "File "+inputFilePathStr+" has been updated", - 10*time.Second, + 20*time.Second, "Filestream did not detect change in the file") // Wait for Filestream to finish reading the file From cec421905008962c74e8379300cf25d2cf63bb49 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Thu, 13 Nov 2025 18:18:18 -0500 Subject: [PATCH 10/17] Update notice --- NOTICE-fips.txt | 217 +++++++++++++++++++++++++++++++- NOTICE.txt | 6 +- dev-tools/notice/overrides.json | 1 + 3 files changed, 218 insertions(+), 6 deletions(-) diff --git a/NOTICE-fips.txt b/NOTICE-fips.txt index acc2f957e9b..ed3b9729648 100644 --- a/NOTICE-fips.txt +++ b/NOTICE-fips.txt @@ -786,12 +786,12 @@ Contents of probable licence file $GOMODCACHE/github.com/dolmen-go/contextio@v0. -------------------------------------------------------------------------------- -Dependency : github.com/elastic/beats/v7 -Version: v7.0.0-alpha2.0.20251112213255-637949be4421 +Dependency : github.com/belimawr/beats/v7 +Version: v7.0.0-alpha2.0.20251113165107-c90e90cb0a8c Licence type (autodetected): Elastic -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20251112213255-637949be4421/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/belimawr/beats/v7@v7.0.0-alpha2.0.20251113165107-c90e90cb0a8c/LICENSE.txt: Source code in this repository is variously licensed under the Apache License Version 2.0, an Apache compatible license, or the Elastic License. Outside of @@ -32004,6 +32004,217 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/go-windows@v1.0 limitations under the License. +-------------------------------------------------------------------------------- +Dependency : github.com/elastic/gokrb5/v8 +Version: v8.0.0-20251105095404-23cc45e6a102 +Licence type (autodetected): Apache-2.0 +-------------------------------------------------------------------------------- + +Contents of probable licence file $GOMODCACHE/github.com/elastic/gokrb5/v8@v8.0.0-20251105095404-23cc45e6a102/LICENSE: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + -------------------------------------------------------------------------------- Dependency : github.com/elastic/gosigar Version: v0.14.3 diff --git a/NOTICE.txt b/NOTICE.txt index bd6839637e4..b528e024c8b 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -786,12 +786,12 @@ Contents of probable licence file $GOMODCACHE/github.com/dolmen-go/contextio@v0. -------------------------------------------------------------------------------- -Dependency : github.com/elastic/beats/v7 -Version: v7.0.0-alpha2.0.20251112213255-637949be4421 +Dependency : github.com/belimawr/beats/v7 +Version: v7.0.0-alpha2.0.20251113165107-c90e90cb0a8c Licence type (autodetected): Elastic -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20251112213255-637949be4421/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/belimawr/beats/v7@v7.0.0-alpha2.0.20251113165107-c90e90cb0a8c/LICENSE.txt: Source code in this repository is variously licensed under the Apache License Version 2.0, an Apache compatible license, or the Elastic License. Outside of diff --git a/dev-tools/notice/overrides.json b/dev-tools/notice/overrides.json index 52dfdb1bd0d..8ca6a30772a 100644 --- a/dev-tools/notice/overrides.json +++ b/dev-tools/notice/overrides.json @@ -1,4 +1,5 @@ {"name": "github.com/elastic/beats/v7", "licenceType": "Elastic"} +{"name": "github.com/belimawr/beats/v7", "licenceType": "Elastic"} {"name": "github.com/elastic/elastic-agent-client/v7", "licenceType": "Elastic"} {"name": "github.com/gorhill/cronexpr", "licenceType": "Apache-2.0", "licenceFile":"APLv2"} {"name": "github.com/hashicorp/cronexpr", "licenceType": "Apache-2.0", "licenceFile":"APLv2"} From ef43a1db9de2970b702dfb074f759cb7f9ba9e41 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Thu, 13 Nov 2025 18:46:48 -0500 Subject: [PATCH 11/17] Updates and refactoring --- magefile.go | 3 +- testing/integration/ess/logfile.go | 18 +++++---- .../ess/otel_log_as_filestream_test.go | 37 ++++++++++--------- 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/magefile.go b/magefile.go index 8acced2b278..0d7bc05c0e7 100644 --- a/magefile.go +++ b/magefile.go @@ -2264,9 +2264,8 @@ func (Integration) Local(ctx context.Context, testName string) error { // run the integration tests but only run test that can run locally params := devtools.DefaultGoTestIntegrationArgs() params.Tags = append(params.Tags, "local") - params.ExtraFlags = append(params.ExtraFlags, "-test.count", "1") params.Packages = []string{ - "github.com/elastic/elastic-agent/testing/integration/ess", + "github.com/elastic/elastic-agent/testing/integration/...", } var goTestFlags []string diff --git a/testing/integration/ess/logfile.go b/testing/integration/ess/logfile.go index 08d5987016d..6840fc0e74b 100644 --- a/testing/integration/ess/logfile.go +++ b/testing/integration/ess/logfile.go @@ -19,19 +19,21 @@ import ( "github.com/stretchr/testify/require" ) -// LogFile wraps a *logp.LogFile and makes it more suitable for tests. +// LogFile wraps a *os.File and makes it more suitable for tests. // Key features: -// - All logs are saved on a single temporary log file -// - On failures, the log file is kept and its path printed -// - Methods to search and wait for log entries are provided, +// - On failures, the file is kept and its path printed +// - Methods to search and wait for substrings in lines are provided, // they keep track of the offset, ensuring ordering when -// when searching for logs +// when searching. type LogFile struct { *os.File - offset int64 - KeepLogFile bool + offset int64 + KeepLogFileOnSuccess bool } +// NewLogFile returns a new LogFile, path must be the components of a path, +// they will be joined using the OS path separator. +// If path is not provided, os.TempDir is used as the base path for the file. func NewLogFile(t testing.TB, path ...string) *LogFile { dir := filepath.Join(path...) if dir == "" { @@ -62,7 +64,7 @@ func NewLogFile(t testing.TB, path ...string) *LogFile { // If the test failed, print the log file location, // otherwise remove it. - if t.Failed() || lf.KeepLogFile { + if t.Failed() || lf.KeepLogFileOnSuccess { t.Logf("Full logs written to %s", f.Name()) return } diff --git a/testing/integration/ess/otel_log_as_filestream_test.go b/testing/integration/ess/otel_log_as_filestream_test.go index f56c800956f..9df0aa1cd0b 100644 --- a/testing/integration/ess/otel_log_as_filestream_test.go +++ b/testing/integration/ess/otel_log_as_filestream_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - libbeatinteg "github.com/elastic/beats/v7/libbeat/tests/integration" + libbeattesting "github.com/elastic/beats/v7/libbeat/tests/integration" "github.com/elastic/elastic-agent-libs/testing/estools" "github.com/elastic/elastic-agent/pkg/core/process" atesting "github.com/elastic/elastic-agent/pkg/testing" @@ -53,7 +53,7 @@ func TestFilebeatReceiverLogAsFilestream(t *testing.T) { filebeat: inputs: - type: log - id: foo + id: a-unique-id allow_deprecated_use: true paths: {{.LogFilepath}} @@ -115,15 +115,16 @@ service: } rootDir, err := filepath.Abs(filepath.Join("..", "..", "..", "build")) - if err != nil { - t.Fatalf("cannot get absolute path: %s", err) - } + require.NoError(t, err, "cannot get absolute path of rootDir") - tmpDir := libbeatinteg.CreateTempDir(t, rootDir) + tmpDir := libbeattesting.CreateTempDir(t, rootDir) inputFilePath, err := filepath.Abs(filepath.Join(tmpDir, "log.log")) + + // Generate a string we can use to search in the logs, + // without it tests on Windows will fail inputFilePathStr := strings.ReplaceAll(inputFilePath, `\`, `\\`) - libbeatinteg.WriteLogFile(t, inputFilePath, 50, false) + libbeattesting.WriteLogFile(t, inputFilePath, 50, false) esApiKey := createESApiKey(t, info.ESClient) esHost, err := integration.GetESHost() @@ -133,7 +134,7 @@ service: defer cancel() agentLogFile := NewLogFile(t, tmpDir) - agentLogFile.KeepLogFile = true + agentLogFile.KeepLogFileOnSuccess = true cfg := map[string]any{ "HomeDir": tmpDir, @@ -149,9 +150,9 @@ service: define.Version()) require.NoError(t, err, "cannot create Elastic Agent fixture") - // Start Filebeat receiver running the Log input + // Start Elastic Agent/Filebeat receiver running the Log input otelConfigPath := filepath.Join(tmpDir, "otel.yml") - cmd := StartEAOtel(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, agentLogFile.File) + cmd := StartElasticAgentOtel(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, agentLogFile.File) agentLogFile.WaitLogsContains( t, "Log input (deprecated) running as Log input (deprecated)", @@ -161,11 +162,11 @@ service: // Wait for all events to be ingested and stop Elastic Agent waitEventsInES(50) - StopEAOtel(t, cmd, agentLogFile) + StopElasticAgentOtel(t, cmd, agentLogFile) // Enable the feature flag and start Elastic Agent cfg["AsFilestream"] = true - cmd = StartEAOtel(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, agentLogFile.File) + cmd = StartElasticAgentOtel(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, agentLogFile.File) // Ensure the Filesteam input starts agentLogFile.WaitLogsContains( @@ -183,7 +184,7 @@ service: ) // Add 50 events to the file, it now contains 100 events - libbeatinteg.WriteLogFile(t, inputFilePath, 50, true) + libbeattesting.WriteLogFile(t, inputFilePath, 50, true) agentLogFile.WaitLogsContains( t, @@ -200,10 +201,10 @@ service: // Ensure all 100 events have been ingested and stop Elastic Agent waitEventsInES(100) - StopEAOtel(t, cmd, agentLogFile) + StopElasticAgentOtel(t, cmd, agentLogFile) // Start Elastic Agent again to ensure it is correctly tracking the state - cmd = StartEAOtel(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, agentLogFile.File) + cmd = StartElasticAgentOtel(t, ctx, otelConfigTemplate, otelConfigPath, cfg, fixture, agentLogFile.File) agentLogFile.WaitLogsContains( t, "Log input (deprecated) running as Filestream input", @@ -225,13 +226,13 @@ service: "Filestream did not reach EOF") // Stop Elastic Agent - StopEAOtel(t, cmd, agentLogFile) + StopElasticAgentOtel(t, cmd, agentLogFile) // Ensure there was no data duplication waitEventsInES(100) } -func StartEAOtel( +func StartElasticAgentOtel( t *testing.T, ctx context.Context, otelConfigTemplate string, @@ -268,7 +269,7 @@ func StartEAOtel( return cmd } -func StopEAOtel(t *testing.T, cmd *exec.Cmd, f *LogFile) { +func StopElasticAgentOtel(t *testing.T, cmd *exec.Cmd, f *LogFile) { require.NoError( t, process.Terminate(cmd.Process), From 2fc07e21163a3090f5d83472b9e481ca27f6938b Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Mon, 17 Nov 2025 17:44:13 -0500 Subject: [PATCH 12/17] Update Beats --- NOTICE-fips.txt | 4 ++-- NOTICE.txt | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/NOTICE-fips.txt b/NOTICE-fips.txt index b790876099e..f6bacc15be2 100644 --- a/NOTICE-fips.txt +++ b/NOTICE-fips.txt @@ -787,11 +787,11 @@ Contents of probable licence file $GOMODCACHE/github.com/dolmen-go/contextio@v0. -------------------------------------------------------------------------------- Dependency : github.com/belimawr/beats/v7 -Version: v7.0.0-alpha2.0.20251113165107-c90e90cb0a8c +Version: v7.0.0-alpha2.0.20251114165358-f06437940a8a Licence type (autodetected): Elastic -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/belimawr/beats/v7@v7.0.0-alpha2.0.20251113165107-c90e90cb0a8c/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/belimawr/beats/v7@v7.0.0-alpha2.0.20251114165358-f06437940a8a/LICENSE.txt: Source code in this repository is variously licensed under the Apache License Version 2.0, an Apache compatible license, or the Elastic License. Outside of diff --git a/NOTICE.txt b/NOTICE.txt index 15f311df025..a8bcc362477 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -787,11 +787,11 @@ Contents of probable licence file $GOMODCACHE/github.com/dolmen-go/contextio@v0. -------------------------------------------------------------------------------- Dependency : github.com/belimawr/beats/v7 -Version: v7.0.0-alpha2.0.20251113165107-c90e90cb0a8c +Version: v7.0.0-alpha2.0.20251114165358-f06437940a8a Licence type (autodetected): Elastic -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/belimawr/beats/v7@v7.0.0-alpha2.0.20251113165107-c90e90cb0a8c/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/belimawr/beats/v7@v7.0.0-alpha2.0.20251114165358-f06437940a8a/LICENSE.txt: Source code in this repository is variously licensed under the Apache License Version 2.0, an Apache compatible license, or the Elastic License. Outside of diff --git a/go.mod b/go.mod index 58ca4de88c9..9dbb0a6b028 100644 --- a/go.mod +++ b/go.mod @@ -821,4 +821,4 @@ replace go.opentelemetry.io/otel/exporters/prometheus => go.opentelemetry.io/ote replace github.com/elastic/elastic-agent/internal/edot => ./internal/edot -replace github.com/elastic/beats/v7 => github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251113165107-c90e90cb0a8c +replace github.com/elastic/beats/v7 => github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251114165358-f06437940a8a diff --git a/go.sum b/go.sum index 496ae79d8bc..284d35ba2bb 100644 --- a/go.sum +++ b/go.sum @@ -327,8 +327,8 @@ github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/beevik/ntp v1.4.3 h1:PlbTvE5NNy4QHmA4Mg57n7mcFTmr1W1j3gcK7L1lqho= github.com/beevik/ntp v1.4.3/go.mod h1:Unr8Zg+2dRn7d8bHFuehIMSvvUYssHMxW3Q5Nx4RW5Q= -github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251113165107-c90e90cb0a8c h1:vKLWg1qZ7gmTpl07M/+FR5X6LwraPnRIjEdeci7dozs= -github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251113165107-c90e90cb0a8c/go.mod h1:w0cm93er1O75o3byGAt6vzfmAVdHJaco4/gFJ2DtnWo= +github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251114165358-f06437940a8a h1:YGIcv5zcGb2yIYLv+6FUeqfOeKGdEHng1Uz4SvRGaSQ= +github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251114165358-f06437940a8a/go.mod h1:c8O8MuFlYOkEbT1qdC/iaiTHD2u2mCrCJZtkl4+shTg= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= From 4e749f668f89d84f564542f45cf8bc6c6ca151b7 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Mon, 17 Nov 2025 18:45:43 -0500 Subject: [PATCH 13/17] Add sending_queue and increase timeout --- testing/integration/ess/otel_log_as_filestream_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/integration/ess/otel_log_as_filestream_test.go b/testing/integration/ess/otel_log_as_filestream_test.go index 9df0aa1cd0b..aafea4c2541 100644 --- a/testing/integration/ess/otel_log_as_filestream_test.go +++ b/testing/integration/ess/otel_log_as_filestream_test.go @@ -72,6 +72,10 @@ exporters: elasticsearch: api_key: {{.ESApiKey}} endpoint: {{.ESEndpoint}} + sending_queue: + enabled: true + wait_for_result: true # Avoid losing data on shutdown + block_on_overflow: true mapping: mode: none @@ -111,7 +115,7 @@ service: "expecting %d events, got %d", want, got) - }, 30*time.Second, time.Second, "did not find the expected number of events") + }, 60*time.Second, time.Second, "did not find the expected number of events") } rootDir, err := filepath.Abs(filepath.Join("..", "..", "..", "build")) From e18f2cfdbf71adae1c56e7afc2cad1669a29dfda Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Tue, 18 Nov 2025 13:10:17 -0500 Subject: [PATCH 14/17] Use an unique index to avoid mapping conflicts --- testing/integration/ess/otel_log_as_filestream_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/testing/integration/ess/otel_log_as_filestream_test.go b/testing/integration/ess/otel_log_as_filestream_test.go index aafea4c2541..16c3b6f72a1 100644 --- a/testing/integration/ess/otel_log_as_filestream_test.go +++ b/testing/integration/ess/otel_log_as_filestream_test.go @@ -72,6 +72,7 @@ exporters: elasticsearch: api_key: {{.ESApiKey}} endpoint: {{.ESEndpoint}} + logs_index: {{.Namespace}} sending_queue: enabled: true wait_for_result: true # Avoid losing data on shutdown @@ -98,13 +99,10 @@ service: findCtx, findCancel := context.WithTimeout(t.Context(), 5*time.Second) defer findCancel() - docs, err := estools.GetLogsForIndexWithContext( + docs, err := estools.GetAllLogsForIndexWithContext( findCtx, info.ESClient, - ".ds-logs-generic-default*", - map[string]any{ - "Body.fields.find_me": info.Namespace, - }) + info.Namespace) require.NoError(c, err) got := docs.Hits.Total.Value From af7c0ce4a82605b2fdf2b55e8c8fb90446dd7ae8 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Tue, 18 Nov 2025 13:16:45 -0500 Subject: [PATCH 15/17] Use unique index for TestOtelLogsIngestion --- testing/integration/ess/otel_test.go | 52 ++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/testing/integration/ess/otel_test.go b/testing/integration/ess/otel_test.go index 91dceab99eb..7d004e350c5 100644 --- a/testing/integration/ess/otel_test.go +++ b/testing/integration/ess/otel_test.go @@ -22,6 +22,7 @@ import ( "text/template" "time" + libbeattesting "github.com/elastic/beats/v7/libbeat/tests/integration" "github.com/elastic/elastic-agent/pkg/control/v2/cproto" "github.com/google/go-cmp/cmp" @@ -472,6 +473,10 @@ exporters: elasticsearch: api_key: {{.ESApiKey}} endpoint: {{.ESEndpoint}} + logs_index: {{.TestId}} + sending_queue: + wait_for_result: true + block_on_overflow: true mapping: mode: none @@ -498,6 +503,13 @@ service: - resource/add-test-id receivers: - filelog + telemetry: + logs: + level: DEBUG + encoding: json + disable_stacktrace: true + output_paths: + - {{.OTelLogFile}} ` func TestOtelLogsIngestion(t *testing.T) { @@ -515,8 +527,14 @@ func TestOtelLogsIngestion(t *testing.T) { // Prepare the OTel config. testId := info.Namespace - tempDir := t.TempDir() + // Ensure everything is saved in case of test failure + // this folder is also collected on CI. + rootDir, err := filepath.Abs(filepath.Join("..", "..", "..", "build")) + require.NoError(t, err, "cannot get absolute path of rootDir") + + tempDir := libbeattesting.CreateTempDir(t, rootDir) inputFilePath := filepath.Join(tempDir, "input.log") + otelLogFilePath := filepath.Join(tempDir, "elastic-agent.ndjson") esHost, err := integration.GetESHost() require.NoError(t, err, "failed to get ES host") @@ -531,6 +549,7 @@ func TestOtelLogsIngestion(t *testing.T) { logsIngestionConfig = strings.ReplaceAll(logsIngestionConfig, "{{.ESEndpoint}}", esHost) logsIngestionConfig = strings.ReplaceAll(logsIngestionConfig, "{{.InputFilePath}}", inputFilePath) logsIngestionConfig = strings.ReplaceAll(logsIngestionConfig, "{{.TestId}}", testId) + logsIngestionConfig = strings.ReplaceAll(logsIngestionConfig, "{{.OTelLogFile}}", otelLogFilePath) cfgFilePath := filepath.Join(tempDir, "otel.yml") require.NoError(t, os.WriteFile(cfgFilePath, []byte(logsIngestionConfig), 0o600)) @@ -568,22 +587,27 @@ func TestOtelLogsIngestion(t *testing.T) { _ = os.Remove(inputFilePath) }) - actualHits := &struct{ Hits int }{} - require.Eventually(t, - func() bool { - findCtx, findCancel := context.WithTimeout(context.Background(), 10*time.Second) + require.EventuallyWithT( + t, + func(c *assert.CollectT) { + findCtx, findCancel := context.WithTimeout(t.Context(), 10*time.Second) defer findCancel() - docs, err := estools.GetLogsForIndexWithContext(findCtx, esClient, ".ds-logs-generic-default*", map[string]interface{}{ - "Resource.test.id": testId, - }) - require.NoError(t, err) - - actualHits.Hits = docs.Hits.Total.Value - return actualHits.Hits == logsCount + docs, err := estools.GetAllLogsForIndexWithContext( + findCtx, + esClient, + testId) + require.NoError(c, err) + require.Equalf( + c, + logsCount, + docs.Hits.Total.Value, + "expecting %d events", + logsCount) }, - 2*time.Minute, 1*time.Second, - "Expected %v logs, got %v", logsCount, actualHits) + 2*time.Minute, + time.Second, + "did not find the expected number of events") cancel() fixtureWg.Wait() From d36fc950784452f7548a7df3d7dd493ea5f808db Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Fri, 21 Nov 2025 08:36:12 -0500 Subject: [PATCH 16/17] Update Beats --- NOTICE-fips.txt | 4 ++-- NOTICE.txt | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/NOTICE-fips.txt b/NOTICE-fips.txt index d822255c3ba..1c2cf6ed8d0 100644 --- a/NOTICE-fips.txt +++ b/NOTICE-fips.txt @@ -787,11 +787,11 @@ Contents of probable licence file $GOMODCACHE/github.com/dolmen-go/contextio@v0. -------------------------------------------------------------------------------- Dependency : github.com/belimawr/beats/v7 -Version: v7.0.0-alpha2.0.20251118162517-f57e2d758792 +Version: v7.0.0-alpha2.0.20251121133217-d165778609a4 Licence type (autodetected): Elastic -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/belimawr/beats/v7@v7.0.0-alpha2.0.20251118162517-f57e2d758792/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/belimawr/beats/v7@v7.0.0-alpha2.0.20251121133217-d165778609a4/LICENSE.txt: Source code in this repository is variously licensed under the Apache License Version 2.0, an Apache compatible license, or the Elastic License. Outside of diff --git a/NOTICE.txt b/NOTICE.txt index 3111de5567e..413adf8f742 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -787,11 +787,11 @@ Contents of probable licence file $GOMODCACHE/github.com/dolmen-go/contextio@v0. -------------------------------------------------------------------------------- Dependency : github.com/belimawr/beats/v7 -Version: v7.0.0-alpha2.0.20251118162517-f57e2d758792 +Version: v7.0.0-alpha2.0.20251121133217-d165778609a4 Licence type (autodetected): Elastic -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/belimawr/beats/v7@v7.0.0-alpha2.0.20251118162517-f57e2d758792/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/belimawr/beats/v7@v7.0.0-alpha2.0.20251121133217-d165778609a4/LICENSE.txt: Source code in this repository is variously licensed under the Apache License Version 2.0, an Apache compatible license, or the Elastic License. Outside of diff --git a/go.mod b/go.mod index e61194aabbb..27849598b3e 100644 --- a/go.mod +++ b/go.mod @@ -818,4 +818,4 @@ replace go.opentelemetry.io/otel/exporters/prometheus => go.opentelemetry.io/ote replace github.com/elastic/elastic-agent/internal/edot => ./internal/edot -replace github.com/elastic/beats/v7 => github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251118162517-f57e2d758792 +replace github.com/elastic/beats/v7 => github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251121133217-d165778609a4 diff --git a/go.sum b/go.sum index 3c7751033ed..e105b497fee 100644 --- a/go.sum +++ b/go.sum @@ -321,8 +321,8 @@ github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/beevik/ntp v1.4.3 h1:PlbTvE5NNy4QHmA4Mg57n7mcFTmr1W1j3gcK7L1lqho= github.com/beevik/ntp v1.4.3/go.mod h1:Unr8Zg+2dRn7d8bHFuehIMSvvUYssHMxW3Q5Nx4RW5Q= -github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251118162517-f57e2d758792 h1:iYFFnAD7KLcD/fk6VnWA2lgKLT9oUPSc2tmBexyjGQ8= -github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251118162517-f57e2d758792/go.mod h1:c8O8MuFlYOkEbT1qdC/iaiTHD2u2mCrCJZtkl4+shTg= +github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251121133217-d165778609a4 h1:Q12Sp1GqTdmYcV4KdHXyTZZsqufLRiLLBt3tr0wHtYM= +github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251121133217-d165778609a4/go.mod h1:5pgG8KL52P6yywu+i+Fp+KRbbGc6u8oEnckGtJWGsRk= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= From 3385f8b7ee7aa7dda8c2d19e194baa6ef922ec07 Mon Sep 17 00:00:00 2001 From: Tiago Queiroz Date: Wed, 3 Dec 2025 12:57:28 -0500 Subject: [PATCH 17/17] Remove Beats replace directive --- NOTICE-fips.txt | 26 ++++++++++---------- NOTICE.txt | 56 ++++++++++---------------------------------- go.mod | 15 +++++------- go.sum | 29 ++++++++++------------- internal/edot/go.mod | 13 +++++----- internal/edot/go.sum | 29 ++++++++++------------- 6 files changed, 62 insertions(+), 106 deletions(-) diff --git a/NOTICE-fips.txt b/NOTICE-fips.txt index 1c2cf6ed8d0..522ebac7061 100644 --- a/NOTICE-fips.txt +++ b/NOTICE-fips.txt @@ -786,12 +786,12 @@ Contents of probable licence file $GOMODCACHE/github.com/dolmen-go/contextio@v0. -------------------------------------------------------------------------------- -Dependency : github.com/belimawr/beats/v7 -Version: v7.0.0-alpha2.0.20251121133217-d165778609a4 +Dependency : github.com/elastic/beats/v7 +Version: v7.0.0-alpha2.0.20251203173126-96dc1b39c163 Licence type (autodetected): Elastic -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/belimawr/beats/v7@v7.0.0-alpha2.0.20251121133217-d165778609a4/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20251203173126-96dc1b39c163/LICENSE.txt: Source code in this repository is variously licensed under the Apache License Version 2.0, an Apache compatible license, or the Elastic License. Outside of @@ -1254,11 +1254,11 @@ SOFTWARE -------------------------------------------------------------------------------- Dependency : github.com/elastic/elastic-agent-libs -Version: v0.26.1 +Version: v0.26.2 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-libs@v0.26.1/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-libs@v0.26.2/LICENSE: Apache License Version 2.0, January 2004 @@ -6930,11 +6930,11 @@ limitations under the License. -------------------------------------------------------------------------------- Dependency : golang.org/x/crypto -Version: v0.44.0 +Version: v0.45.0 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/golang.org/x/crypto@v0.44.0/LICENSE: +Contents of probable licence file $GOMODCACHE/golang.org/x/crypto@v0.45.0/LICENSE: Copyright 2009 The Go Authors. @@ -31975,11 +31975,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/lunes@v0.1.0/LI -------------------------------------------------------------------------------- Dependency : github.com/elastic/mito -Version: v1.23.0 +Version: v1.24.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/mito@v1.23.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/elastic/mito@v1.24.0/LICENSE: Apache License @@ -37027,11 +37027,11 @@ Contents of probable licence file $GOMODCACHE/github.com/go-openapi/swag@v0.23.0 -------------------------------------------------------------------------------- Dependency : github.com/go-resty/resty/v2 -Version: v2.16.5 +Version: v2.17.0 Licence type (autodetected): MIT -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/go-resty/resty/v2@v2.16.5/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/go-resty/resty/v2@v2.17.0/LICENSE: The MIT License (MIT) @@ -49415,11 +49415,11 @@ SOFTWARE. -------------------------------------------------------------------------------- Dependency : github.com/microsoft/go-mssqldb -Version: v1.9.3 +Version: v1.9.4 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/microsoft/go-mssqldb@v1.9.3/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/microsoft/go-mssqldb@v1.9.4/LICENSE.txt: Copyright (c) 2012 The Go Authors. All rights reserved. Copyright (c) Microsoft Corporation. diff --git a/NOTICE.txt b/NOTICE.txt index 413adf8f742..030ba3ca006 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -786,12 +786,12 @@ Contents of probable licence file $GOMODCACHE/github.com/dolmen-go/contextio@v0. -------------------------------------------------------------------------------- -Dependency : github.com/belimawr/beats/v7 -Version: v7.0.0-alpha2.0.20251121133217-d165778609a4 +Dependency : github.com/elastic/beats/v7 +Version: v7.0.0-alpha2.0.20251203173126-96dc1b39c163 Licence type (autodetected): Elastic -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/belimawr/beats/v7@v7.0.0-alpha2.0.20251121133217-d165778609a4/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20251203173126-96dc1b39c163/LICENSE.txt: Source code in this repository is variously licensed under the Apache License Version 2.0, an Apache compatible license, or the Elastic License. Outside of @@ -1254,11 +1254,11 @@ SOFTWARE -------------------------------------------------------------------------------- Dependency : github.com/elastic/elastic-agent-libs -Version: v0.26.1 +Version: v0.26.2 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-libs@v0.26.1/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/elastic/elastic-agent-libs@v0.26.2/LICENSE: Apache License Version 2.0, January 2004 @@ -6930,11 +6930,11 @@ limitations under the License. -------------------------------------------------------------------------------- Dependency : golang.org/x/crypto -Version: v0.44.0 +Version: v0.45.0 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/golang.org/x/crypto@v0.44.0/LICENSE: +Contents of probable licence file $GOMODCACHE/golang.org/x/crypto@v0.45.0/LICENSE: Copyright 2009 The Go Authors. @@ -33495,11 +33495,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/lunes@v0.1.0/LI -------------------------------------------------------------------------------- Dependency : github.com/elastic/mito -Version: v1.23.0 +Version: v1.24.0 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/mito@v1.23.0/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/elastic/mito@v1.24.0/LICENSE: Apache License @@ -36026,36 +36026,6 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/opentelemetry-l limitations under the License. --------------------------------------------------------------------------------- -Dependency : github.com/elastic/pkcs8 -Version: v1.0.0 -Licence type (autodetected): MIT --------------------------------------------------------------------------------- - -Contents of probable licence file $GOMODCACHE/github.com/elastic/pkcs8@v1.0.0/LICENSE: - -The MIT License (MIT) - -Copyright (c) 2014 youmark - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -------------------------------------------------------------------------------- Dependency : github.com/elastic/sarama Version: v1.19.1-0.20250603175145-7672917f26b6 @@ -39919,11 +39889,11 @@ Contents of probable licence file $GOMODCACHE/github.com/go-openapi/validate@v0. -------------------------------------------------------------------------------- Dependency : github.com/go-resty/resty/v2 -Version: v2.16.5 +Version: v2.17.0 Licence type (autodetected): MIT -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/go-resty/resty/v2@v2.16.5/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/go-resty/resty/v2@v2.17.0/LICENSE: The MIT License (MIT) @@ -52892,11 +52862,11 @@ SOFTWARE. -------------------------------------------------------------------------------- Dependency : github.com/microsoft/go-mssqldb -Version: v1.9.3 +Version: v1.9.4 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/microsoft/go-mssqldb@v1.9.3/LICENSE.txt: +Contents of probable licence file $GOMODCACHE/github.com/microsoft/go-mssqldb@v1.9.4/LICENSE.txt: Copyright (c) 2012 The Go Authors. All rights reserved. Copyright (c) Microsoft Corporation. diff --git a/go.mod b/go.mod index 27849598b3e..92fc1a2e869 100644 --- a/go.mod +++ b/go.mod @@ -14,11 +14,11 @@ require ( github.com/docker/docker v28.5.1+incompatible github.com/docker/go-units v0.5.0 github.com/dolmen-go/contextio v0.0.0-20200217195037-68fc5150bcd5 - github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251120193515-55629bc7b87a + github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251203173126-96dc1b39c163 github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae github.com/elastic/elastic-agent-autodiscover v0.10.0 github.com/elastic/elastic-agent-client/v7 v7.17.2 - github.com/elastic/elastic-agent-libs v0.26.1 + github.com/elastic/elastic-agent-libs v0.26.2 github.com/elastic/elastic-agent-system-metrics v0.13.4 github.com/elastic/elastic-agent/internal/edot v0.0.0-20251114132921-c463803c5568 github.com/elastic/elastic-transport-go/v8 v8.8.0 @@ -63,7 +63,7 @@ require ( go.opentelemetry.io/collector/pipeline v1.45.0 go.uber.org/zap v1.27.0 go.yaml.in/yaml/v3 v3.0.4 - golang.org/x/crypto v0.44.0 + golang.org/x/crypto v0.45.0 golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6 golang.org/x/mod v0.30.0 golang.org/x/net v0.47.0 @@ -307,7 +307,7 @@ require ( github.com/elastic/gokrb5/v8 v8.0.0-20251105095404-23cc45e6a102 // indirect github.com/elastic/gosigar v0.14.3 // indirect github.com/elastic/lunes v0.1.0 // indirect - github.com/elastic/mito v1.23.0 // indirect + github.com/elastic/mito v1.24.0 // indirect github.com/elastic/opentelemetry-collector-components/connector/elasticapmconnector v0.20.0 // indirect github.com/elastic/opentelemetry-collector-components/connector/profilingmetricsconnector v0.20.0 // indirect github.com/elastic/opentelemetry-collector-components/extension/apikeyauthextension v0.22.0 // indirect @@ -320,7 +320,6 @@ require ( github.com/elastic/opentelemetry-collector-components/processor/lsmintervalprocessor v0.20.0 // indirect github.com/elastic/opentelemetry-collector-components/receiver/elasticapmintakereceiver v0.21.0 // indirect github.com/elastic/opentelemetry-lib v0.26.0 // indirect - github.com/elastic/pkcs8 v1.0.0 // indirect github.com/elastic/sarama v1.19.1-0.20250603175145-7672917f26b6 // indirect github.com/emicklei/go-restful/v3 v3.12.2 // indirect github.com/envoyproxy/go-control-plane/envoy v1.35.0 // indirect @@ -357,7 +356,7 @@ require ( github.com/go-openapi/strfmt v0.24.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/go-openapi/validate v0.24.0 // indirect - github.com/go-resty/resty/v2 v2.16.5 // indirect + github.com/go-resty/resty/v2 v2.17.0 // indirect github.com/go-sourcemap/sourcemap v2.1.4+incompatible // indirect github.com/go-sql-driver/mysql v1.9.3 // indirect github.com/go-zookeeper/zk v1.0.4 // indirect @@ -464,7 +463,7 @@ require ( github.com/mdlayher/socket v0.4.1 // indirect github.com/mdlayher/vsock v1.2.1 // indirect github.com/meraki/dashboard-api-go/v3 v3.0.9 // indirect - github.com/microsoft/go-mssqldb v1.9.3 // indirect + github.com/microsoft/go-mssqldb v1.9.4 // indirect github.com/microsoft/wmi v0.34.0 // indirect github.com/miekg/dns v1.1.68 // indirect github.com/mileusna/useragent v1.3.5 // indirect @@ -817,5 +816,3 @@ replace ( replace go.opentelemetry.io/otel/exporters/prometheus => go.opentelemetry.io/otel/exporters/prometheus v0.58.0 replace github.com/elastic/elastic-agent/internal/edot => ./internal/edot - -replace github.com/elastic/beats/v7 => github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251121133217-d165778609a4 diff --git a/go.sum b/go.sum index e105b497fee..518226924a4 100644 --- a/go.sum +++ b/go.sum @@ -321,8 +321,6 @@ github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3 h1:6df1vn4bBlDDo github.com/bboreham/go-loser v0.0.0-20230920113527-fcc2c21820a3/go.mod h1:CIWtjkly68+yqLPbvwwR/fjNJA/idrtULjZWh2v1ys0= github.com/beevik/ntp v1.4.3 h1:PlbTvE5NNy4QHmA4Mg57n7mcFTmr1W1j3gcK7L1lqho= github.com/beevik/ntp v1.4.3/go.mod h1:Unr8Zg+2dRn7d8bHFuehIMSvvUYssHMxW3Q5Nx4RW5Q= -github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251121133217-d165778609a4 h1:Q12Sp1GqTdmYcV4KdHXyTZZsqufLRiLLBt3tr0wHtYM= -github.com/belimawr/beats/v7 v7.0.0-alpha2.0.20251121133217-d165778609a4/go.mod h1:5pgG8KL52P6yywu+i+Fp+KRbbGc6u8oEnckGtJWGsRk= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -505,14 +503,16 @@ github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumpti github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption v1.1.0-elastic/go.mod h1:0vCBR1wgGwZeGmloJ+eCWIZF2S47grTXRzj2mftg2Nk= github.com/elastic/bayeux v1.0.5 h1:UceFq01ipmT3S8DzFK+uVAkbCdiPR0Bqei8qIGmUeY0= github.com/elastic/bayeux v1.0.5/go.mod h1:CSI4iP7qeo5MMlkznGvYKftp8M7qqP/3nzmVZoXHY68= +github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251203173126-96dc1b39c163 h1:U/zcMEPIsEhzXJ8PjEFyn5bgy4GJKIFuTQ/MVr9Zry4= +github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251203173126-96dc1b39c163/go.mod h1:jFJMJMOG18CdEbvM3UKQnn3Ft66j2vgMfStZwLAcK+A= github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae h1:OiShmbWAyGU0MS0ADJWr1/QgeLIZliMk9xsrFicR3/s= github.com/elastic/cloud-on-k8s/v2 v2.0.0-20250327073047-b624240832ae/go.mod h1:D2IckZVXARugvikE4fv1glvaJMohKSZRzrPsxCjo9O0= github.com/elastic/elastic-agent-autodiscover v0.10.0 h1:WJ4zl9uSfk1kHmn2B/0byQBLIL607Zt4LNfOgV7+XN0= github.com/elastic/elastic-agent-autodiscover v0.10.0/go.mod h1:Nf3zh9FcJ9nTTswTwDTUAqXmvQllOrNliM6xmORSxwE= github.com/elastic/elastic-agent-client/v7 v7.17.2 h1:Cl2TeABqWZgW40t5fchGWT/sRk4MDDLWA0d8iHHOxLA= github.com/elastic/elastic-agent-client/v7 v7.17.2/go.mod h1:5irRFqp6HLqtu1S+OeY0jg8x7K6PLL+DW+PwVk1vJnk= -github.com/elastic/elastic-agent-libs v0.26.1 h1:ywjSQajyjiv7zQTsyZjghIVb7PpPCrXZRUOhbV3KdFM= -github.com/elastic/elastic-agent-libs v0.26.1/go.mod h1:o/iXtbHYaojpG4BOY7Z3hFMQAgEoqq2owO17JPGpf3A= +github.com/elastic/elastic-agent-libs v0.26.2 h1:zwytPWmTWSJG80oa9/5FJ6zue47ysI23eMo15LfeWy0= +github.com/elastic/elastic-agent-libs v0.26.2/go.mod h1:fc2noLqosmQorIGbatJfVeh4CL77yiP8ot16/5umeoM= github.com/elastic/elastic-agent-system-metrics v0.13.4 h1:gX8VdlQyakPcPKFpD7uHv2QLRDyguuKfZgu0LE27V7c= github.com/elastic/elastic-agent-system-metrics v0.13.4/go.mod h1:lB8veYWYBlA9eF6TahmPN87G1IEgWlbep7QSqLSW90U= github.com/elastic/elastic-transport-go/v8 v8.8.0 h1:7k1Ua+qluFr6p1jfJjGDl97ssJS/P7cHNInzfxgBQAo= @@ -557,8 +557,8 @@ github.com/elastic/gosigar v0.14.3 h1:xwkKwPia+hSfg9GqrCUKYdId102m9qTJIIr7egmK/u github.com/elastic/gosigar v0.14.3/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= github.com/elastic/lunes v0.1.0 h1:amRtLPjwkWtzDF/RKzcEPMvSsSseLDLW+bnhfNSLRe4= github.com/elastic/lunes v0.1.0/go.mod h1:xGphYIt3XdZRtyWosHQTErsQTd4OP1p9wsbVoHelrd4= -github.com/elastic/mito v1.23.0 h1:V9wS2EWpKWibLP+0WE2CXr4J/Mt/IPj1G+zf/ELNp/I= -github.com/elastic/mito v1.23.0/go.mod h1:h1V+8B62+DXsu0TstJkjsTh5ewJIDJlwzxPkP3HBM9s= +github.com/elastic/mito v1.24.0 h1:JFviWHsJOepVuIgARirMwe9My/NXkEht5c/j0KptrRM= +github.com/elastic/mito v1.24.0/go.mod h1:h1V+8B62+DXsu0TstJkjsTh5ewJIDJlwzxPkP3HBM9s= github.com/elastic/mock-es v0.0.0-20250530054253-8c3b6053f9b6 h1:JVNuBrmOoqLJgp9o68YBMnOrXCzQI3mCppW+suwRSlw= github.com/elastic/mock-es v0.0.0-20250530054253-8c3b6053f9b6/go.mod h1:cXqWcLnmu5y4QveTb2hjk7rgzkHMuZsqeXtbJpNAcu0= github.com/elastic/opentelemetry-collector-components/connector/elasticapmconnector v0.20.0 h1:UXuHrl76EUHn+PIVEiVFqdGKZwzNLLfhnoBKfmuxSrk= @@ -585,8 +585,6 @@ github.com/elastic/opentelemetry-collector-components/receiver/elasticapmintaker github.com/elastic/opentelemetry-collector-components/receiver/elasticapmintakereceiver v0.21.0/go.mod h1:N4WqsVYCLY61Hjky9Yj/mtwtwJRxByWvuEg5cXmM1D8= github.com/elastic/opentelemetry-lib v0.26.0 h1:651I/49XOqc3o+8nRz0kMXwcs2kyEclXEtWeOfe7iBk= github.com/elastic/opentelemetry-lib v0.26.0/go.mod h1:8TcWo+HmCf7fLE3qWLKqIqpYu+raxMhG0iMHXthDCrY= -github.com/elastic/pkcs8 v1.0.0 h1:HhitlUKxhN288kcNcYkjW6/ouvuwJWd9ioxpjnD9jVA= -github.com/elastic/pkcs8 v1.0.0/go.mod h1:ipsZToJfq1MxclVTwpG7U/bgeDtf+0HkUiOxebk95+0= github.com/elastic/sarama v1.19.1-0.20250603175145-7672917f26b6 h1:2COw7kzXkIyS4hKNUl5qw0KolrwncrY4VVNpngVNo8I= github.com/elastic/sarama v1.19.1-0.20250603175145-7672917f26b6/go.mod h1:Ua/oXS4NS+U/pp/urxgzEGWd1MvocHA+yd4Bu4+Eb80= github.com/elazarl/goproxy v0.0.0-20240909085733-6741dbfc16a1 h1:g7YUigN4dW2+zpdusdTTghZ+5Py3BaUMAStvL8Nk+FY= @@ -696,8 +694,8 @@ github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3Bum github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= github.com/go-quicktest/qt v1.101.1-0.20240301121107-c6c8733fa1e6 h1:teYtXy9B7y5lHTp8V9KPxpYRAVA7dozigQcMiBust1s= github.com/go-quicktest/qt v1.101.1-0.20240301121107-c6c8733fa1e6/go.mod h1:p4lGIVX+8Wa6ZPNDvqcxq36XpUDLh42FLetFU7odllI= -github.com/go-resty/resty/v2 v2.16.5 h1:hBKqmWrr7uRc3euHVqmh1HTHcKn99Smr7o5spptdhTM= -github.com/go-resty/resty/v2 v2.16.5/go.mod h1:hkJtXbA2iKHzJheXYvQ8snQES5ZLGKMwQ07xAwp/fiA= +github.com/go-resty/resty/v2 v2.17.0 h1:pW9DeXcaL4Rrym4EZ8v7L19zZiIlWPg5YXAcVmt+gN0= +github.com/go-resty/resty/v2 v2.17.0/go.mod h1:kCKZ3wWmwJaNc7S29BRtUhJwy7iqmn+2mLtQrOyQlVA= github.com/go-sourcemap/sourcemap v2.1.4+incompatible h1:a+iTbH5auLKxaNwQFg0B+TCYl6lbukKPc7b5x0n1s6Q= github.com/go-sourcemap/sourcemap v2.1.4+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= @@ -1099,8 +1097,8 @@ github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA= github.com/mdlayher/vsock v1.2.1 h1:pC1mTJTvjo1r9n9fbm7S1j04rCgCzhCOS5DY0zqHlnQ= github.com/mdlayher/vsock v1.2.1/go.mod h1:NRfCibel++DgeMD8z/hP+PPTjlNJsdPOmxcnENvE+SE= -github.com/microsoft/go-mssqldb v1.9.3 h1:hy4p+LDC8LIGvI3JATnLVmBOLMJbmn5X400mr5j0lPs= -github.com/microsoft/go-mssqldb v1.9.3/go.mod h1:GBbW9ASTiDC+mpgWDGKdm3FnFLTUsLYN3iFL90lQ+PA= +github.com/microsoft/go-mssqldb v1.9.4 h1:sHrj3GcdgkxytZ09aZ3+ys72pMeyEXJowT44j74pNgs= +github.com/microsoft/go-mssqldb v1.9.4/go.mod h1:GBbW9ASTiDC+mpgWDGKdm3FnFLTUsLYN3iFL90lQ+PA= github.com/microsoft/wmi v0.34.0 h1:1OqBM8Ha8CWMbKYDH6EqUmozgxZ0IuoYwtLkgsJj2zc= github.com/microsoft/wmi v0.34.0/go.mod h1:uImvBuQss3NEnzU5bcwq0DsUh54seU3Sl//oBn62LDw= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= @@ -1973,11 +1971,10 @@ golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58 golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU= -golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc= +golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= +golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6 h1:zfMcR1Cs4KNuomFFgGefv5N0czO2XZpUbxGUy8i8ug0= golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6/go.mod h1:46edojNIoXTNOhySWIWdix628clX9ODXwPsQuG6hsK0= @@ -2110,7 +2107,6 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= @@ -2126,7 +2122,6 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= diff --git a/internal/edot/go.mod b/internal/edot/go.mod index b04da288daf..b56b1c9fe90 100644 --- a/internal/edot/go.mod +++ b/internal/edot/go.mod @@ -5,9 +5,9 @@ go 1.24.10 replace github.com/elastic/elastic-agent => ../../ require ( - github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251120193515-55629bc7b87a + github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251203173126-96dc1b39c163 github.com/elastic/elastic-agent v0.0.0-00010101000000-000000000000 - github.com/elastic/elastic-agent-libs v0.26.1 + github.com/elastic/elastic-agent-libs v0.26.2 github.com/elastic/opentelemetry-collector-components/connector/elasticapmconnector v0.20.0 github.com/elastic/opentelemetry-collector-components/connector/profilingmetricsconnector v0.20.0 github.com/elastic/opentelemetry-collector-components/extension/apikeyauthextension v0.22.0 @@ -295,11 +295,10 @@ require ( github.com/elastic/gokrb5/v8 v8.0.0-20251105095404-23cc45e6a102 // indirect github.com/elastic/gosigar v0.14.3 // indirect github.com/elastic/lunes v0.1.0 // indirect - github.com/elastic/mito v1.23.0 // indirect + github.com/elastic/mito v1.24.0 // indirect github.com/elastic/opentelemetry-collector-components/internal/sharedcomponent v0.0.0-20251113000200-a6f7cddc8520 // indirect github.com/elastic/opentelemetry-collector-components/processor/lsmintervalprocessor v0.20.0 // indirect github.com/elastic/opentelemetry-lib v0.26.0 // indirect - github.com/elastic/pkcs8 v1.0.0 // indirect github.com/elastic/sarama v1.19.1-0.20250603175145-7672917f26b6 // indirect github.com/emicklei/go-restful/v3 v3.12.2 // indirect github.com/envoyproxy/go-control-plane/envoy v1.35.0 // indirect @@ -331,7 +330,7 @@ require ( github.com/go-openapi/strfmt v0.24.0 // indirect github.com/go-openapi/swag v0.23.0 // indirect github.com/go-openapi/validate v0.24.0 // indirect - github.com/go-resty/resty/v2 v2.16.5 // indirect + github.com/go-resty/resty/v2 v2.17.0 // indirect github.com/go-sourcemap/sourcemap v2.1.4+incompatible // indirect github.com/go-sql-driver/mysql v1.9.3 // indirect github.com/go-viper/mapstructure/v2 v2.4.0 // indirect @@ -434,7 +433,7 @@ require ( github.com/mdlayher/socket v0.4.1 // indirect github.com/mdlayher/vsock v1.2.1 // indirect github.com/meraki/dashboard-api-go/v3 v3.0.9 // indirect - github.com/microsoft/go-mssqldb v1.9.3 // indirect + github.com/microsoft/go-mssqldb v1.9.4 // indirect github.com/microsoft/wmi v0.34.0 // indirect github.com/miekg/dns v1.1.68 // indirect github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 // indirect @@ -654,7 +653,7 @@ require ( go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/arch v0.21.0 // indirect - golang.org/x/crypto v0.44.0 // indirect + golang.org/x/crypto v0.45.0 // indirect golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6 // indirect golang.org/x/mod v0.30.0 // indirect golang.org/x/net v0.47.0 // indirect diff --git a/internal/edot/go.sum b/internal/edot/go.sum index dcc1db3eed3..56eed0222de 100644 --- a/internal/edot/go.sum +++ b/internal/edot/go.sum @@ -432,14 +432,14 @@ github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumpti github.com/elastic/azure-sdk-for-go/sdk/resourcemanager/consumption/armconsumption v1.1.0-elastic/go.mod h1:0vCBR1wgGwZeGmloJ+eCWIZF2S47grTXRzj2mftg2Nk= github.com/elastic/bayeux v1.0.5 h1:UceFq01ipmT3S8DzFK+uVAkbCdiPR0Bqei8qIGmUeY0= github.com/elastic/bayeux v1.0.5/go.mod h1:CSI4iP7qeo5MMlkznGvYKftp8M7qqP/3nzmVZoXHY68= -github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251120193515-55629bc7b87a h1:8wb4cVUzhpMxyvgoAIKuYjEjJrU3VbC+adQfGj1Zc8I= -github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251120193515-55629bc7b87a/go.mod h1:5pgG8KL52P6yywu+i+Fp+KRbbGc6u8oEnckGtJWGsRk= +github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251203173126-96dc1b39c163 h1:U/zcMEPIsEhzXJ8PjEFyn5bgy4GJKIFuTQ/MVr9Zry4= +github.com/elastic/beats/v7 v7.0.0-alpha2.0.20251203173126-96dc1b39c163/go.mod h1:jFJMJMOG18CdEbvM3UKQnn3Ft66j2vgMfStZwLAcK+A= github.com/elastic/elastic-agent-autodiscover v0.10.0 h1:WJ4zl9uSfk1kHmn2B/0byQBLIL607Zt4LNfOgV7+XN0= github.com/elastic/elastic-agent-autodiscover v0.10.0/go.mod h1:Nf3zh9FcJ9nTTswTwDTUAqXmvQllOrNliM6xmORSxwE= github.com/elastic/elastic-agent-client/v7 v7.17.2 h1:Cl2TeABqWZgW40t5fchGWT/sRk4MDDLWA0d8iHHOxLA= github.com/elastic/elastic-agent-client/v7 v7.17.2/go.mod h1:5irRFqp6HLqtu1S+OeY0jg8x7K6PLL+DW+PwVk1vJnk= -github.com/elastic/elastic-agent-libs v0.26.1 h1:ywjSQajyjiv7zQTsyZjghIVb7PpPCrXZRUOhbV3KdFM= -github.com/elastic/elastic-agent-libs v0.26.1/go.mod h1:o/iXtbHYaojpG4BOY7Z3hFMQAgEoqq2owO17JPGpf3A= +github.com/elastic/elastic-agent-libs v0.26.2 h1:zwytPWmTWSJG80oa9/5FJ6zue47ysI23eMo15LfeWy0= +github.com/elastic/elastic-agent-libs v0.26.2/go.mod h1:fc2noLqosmQorIGbatJfVeh4CL77yiP8ot16/5umeoM= github.com/elastic/elastic-agent-system-metrics v0.13.4 h1:gX8VdlQyakPcPKFpD7uHv2QLRDyguuKfZgu0LE27V7c= github.com/elastic/elastic-agent-system-metrics v0.13.4/go.mod h1:lB8veYWYBlA9eF6TahmPN87G1IEgWlbep7QSqLSW90U= github.com/elastic/elastic-transport-go/v8 v8.8.0 h1:7k1Ua+qluFr6p1jfJjGDl97ssJS/P7cHNInzfxgBQAo= @@ -482,8 +482,8 @@ github.com/elastic/gosigar v0.14.3 h1:xwkKwPia+hSfg9GqrCUKYdId102m9qTJIIr7egmK/u github.com/elastic/gosigar v0.14.3/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs= github.com/elastic/lunes v0.1.0 h1:amRtLPjwkWtzDF/RKzcEPMvSsSseLDLW+bnhfNSLRe4= github.com/elastic/lunes v0.1.0/go.mod h1:xGphYIt3XdZRtyWosHQTErsQTd4OP1p9wsbVoHelrd4= -github.com/elastic/mito v1.23.0 h1:V9wS2EWpKWibLP+0WE2CXr4J/Mt/IPj1G+zf/ELNp/I= -github.com/elastic/mito v1.23.0/go.mod h1:h1V+8B62+DXsu0TstJkjsTh5ewJIDJlwzxPkP3HBM9s= +github.com/elastic/mito v1.24.0 h1:JFviWHsJOepVuIgARirMwe9My/NXkEht5c/j0KptrRM= +github.com/elastic/mito v1.24.0/go.mod h1:h1V+8B62+DXsu0TstJkjsTh5ewJIDJlwzxPkP3HBM9s= github.com/elastic/mock-es v0.0.0-20250530054253-8c3b6053f9b6 h1:JVNuBrmOoqLJgp9o68YBMnOrXCzQI3mCppW+suwRSlw= github.com/elastic/mock-es v0.0.0-20250530054253-8c3b6053f9b6/go.mod h1:cXqWcLnmu5y4QveTb2hjk7rgzkHMuZsqeXtbJpNAcu0= github.com/elastic/opentelemetry-collector-components/connector/elasticapmconnector v0.20.0 h1:UXuHrl76EUHn+PIVEiVFqdGKZwzNLLfhnoBKfmuxSrk= @@ -510,8 +510,6 @@ github.com/elastic/opentelemetry-collector-components/receiver/elasticapmintaker github.com/elastic/opentelemetry-collector-components/receiver/elasticapmintakereceiver v0.21.0/go.mod h1:N4WqsVYCLY61Hjky9Yj/mtwtwJRxByWvuEg5cXmM1D8= github.com/elastic/opentelemetry-lib v0.26.0 h1:651I/49XOqc3o+8nRz0kMXwcs2kyEclXEtWeOfe7iBk= github.com/elastic/opentelemetry-lib v0.26.0/go.mod h1:8TcWo+HmCf7fLE3qWLKqIqpYu+raxMhG0iMHXthDCrY= -github.com/elastic/pkcs8 v1.0.0 h1:HhitlUKxhN288kcNcYkjW6/ouvuwJWd9ioxpjnD9jVA= -github.com/elastic/pkcs8 v1.0.0/go.mod h1:ipsZToJfq1MxclVTwpG7U/bgeDtf+0HkUiOxebk95+0= github.com/elastic/sarama v1.19.1-0.20250603175145-7672917f26b6 h1:2COw7kzXkIyS4hKNUl5qw0KolrwncrY4VVNpngVNo8I= github.com/elastic/sarama v1.19.1-0.20250603175145-7672917f26b6/go.mod h1:Ua/oXS4NS+U/pp/urxgzEGWd1MvocHA+yd4Bu4+Eb80= github.com/elazarl/goproxy v0.0.0-20240909085733-6741dbfc16a1 h1:g7YUigN4dW2+zpdusdTTghZ+5Py3BaUMAStvL8Nk+FY= @@ -613,8 +611,8 @@ github.com/go-openapi/validate v0.24.0 h1:LdfDKwNbpB6Vn40xhTdNZAnfLECL81w+VX3Bum github.com/go-openapi/validate v0.24.0/go.mod h1:iyeX1sEufmv3nPbBdX3ieNviWnOZaJ1+zquzJEf2BAQ= github.com/go-quicktest/qt v1.101.1-0.20240301121107-c6c8733fa1e6 h1:teYtXy9B7y5lHTp8V9KPxpYRAVA7dozigQcMiBust1s= github.com/go-quicktest/qt v1.101.1-0.20240301121107-c6c8733fa1e6/go.mod h1:p4lGIVX+8Wa6ZPNDvqcxq36XpUDLh42FLetFU7odllI= -github.com/go-resty/resty/v2 v2.16.5 h1:hBKqmWrr7uRc3euHVqmh1HTHcKn99Smr7o5spptdhTM= -github.com/go-resty/resty/v2 v2.16.5/go.mod h1:hkJtXbA2iKHzJheXYvQ8snQES5ZLGKMwQ07xAwp/fiA= +github.com/go-resty/resty/v2 v2.17.0 h1:pW9DeXcaL4Rrym4EZ8v7L19zZiIlWPg5YXAcVmt+gN0= +github.com/go-resty/resty/v2 v2.17.0/go.mod h1:kCKZ3wWmwJaNc7S29BRtUhJwy7iqmn+2mLtQrOyQlVA= github.com/go-sourcemap/sourcemap v2.1.4+incompatible h1:a+iTbH5auLKxaNwQFg0B+TCYl6lbukKPc7b5x0n1s6Q= github.com/go-sourcemap/sourcemap v2.1.4+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.9.3 h1:U/N249h2WzJ3Ukj8SowVFjdtZKfu9vlLZxjPXV1aweo= @@ -966,8 +964,8 @@ github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA= github.com/mdlayher/vsock v1.2.1 h1:pC1mTJTvjo1r9n9fbm7S1j04rCgCzhCOS5DY0zqHlnQ= github.com/mdlayher/vsock v1.2.1/go.mod h1:NRfCibel++DgeMD8z/hP+PPTjlNJsdPOmxcnENvE+SE= -github.com/microsoft/go-mssqldb v1.9.3 h1:hy4p+LDC8LIGvI3JATnLVmBOLMJbmn5X400mr5j0lPs= -github.com/microsoft/go-mssqldb v1.9.3/go.mod h1:GBbW9ASTiDC+mpgWDGKdm3FnFLTUsLYN3iFL90lQ+PA= +github.com/microsoft/go-mssqldb v1.9.4 h1:sHrj3GcdgkxytZ09aZ3+ys72pMeyEXJowT44j74pNgs= +github.com/microsoft/go-mssqldb v1.9.4/go.mod h1:GBbW9ASTiDC+mpgWDGKdm3FnFLTUsLYN3iFL90lQ+PA= github.com/microsoft/wmi v0.34.0 h1:1OqBM8Ha8CWMbKYDH6EqUmozgxZ0IuoYwtLkgsJj2zc= github.com/microsoft/wmi v0.34.0/go.mod h1:uImvBuQss3NEnzU5bcwq0DsUh54seU3Sl//oBn62LDw= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= @@ -1777,11 +1775,10 @@ golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58 golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= -golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU= -golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc= +golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= +golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6 h1:zfMcR1Cs4KNuomFFgGefv5N0czO2XZpUbxGUy8i8ug0= golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6/go.mod h1:46edojNIoXTNOhySWIWdix628clX9ODXwPsQuG6hsK0= @@ -1907,7 +1904,6 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= @@ -1922,7 +1918,6 @@ golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= -golang.org/x/term v0.19.0/go.mod h1:2CuTdWZ7KHSQwUzKva0cbMg6q2DMI3Mmxp+gKJbskEk= golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU=