Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[filebeat] Introduce otel mode #41849

Merged
merged 56 commits into from
Jan 1, 2025
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
133a5e8
first draft
khushijain21 Dec 2, 2024
e0cff62
first draft
khushijain21 Dec 2, 2024
00d6c0c
end to end otel collector work
khushijain21 Dec 2, 2024
d08f18d
throw error when any other o/p is configure and its related tests
khushijain21 Dec 2, 2024
faf0466
use converters for config translation
khushijain21 Dec 3, 2024
9583762
chore
khushijain21 Dec 3, 2024
e33a4c8
add tests for converters
khushijain21 Dec 3, 2024
c462732
Update libbeat/otelcommon/converters/beatconverter.go
khushijain21 Dec 3, 2024
fc96363
Merge branch 'main' into fosb1
khushijain21 Dec 3, 2024
ff1f4e6
Update x-pack/filebeat/cmd/otel.go
khushijain21 Dec 4, 2024
387fb2d
Update x-pack/filebeat/cmd/otel.go
khushijain21 Dec 4, 2024
d0c394b
abstract converter logic
khushijain21 Dec 4, 2024
5b5ea8b
throw error for unsupported config
khushijain21 Dec 4, 2024
d5fed21
linter issues and documentation
khushijain21 Dec 4, 2024
1855805
Merge branch 'main' into fosb1
khushijain21 Dec 4, 2024
5eb387a
throw error for unsupported ES SSL config and added tests for it
khushijain21 Dec 5, 2024
1e69b19
linting issues
khushijain21 Dec 5, 2024
6c2fe25
linting issue fixed
khushijain21 Dec 5, 2024
1947305
Merge branch 'main' into fosb1
khushijain21 Dec 5, 2024
e5a7b1c
add type safety check
khushijain21 Dec 6, 2024
e416b77
make update
khushijain21 Dec 6, 2024
a3a27bd
add tests for tls and es config
khushijain21 Dec 9, 2024
c890087
Merge remote-tracking branch 'upstream/main' into fosb1
khushijain21 Dec 9, 2024
9fbdad3
update tests
khushijain21 Dec 9, 2024
f0717cd
add notice
khushijain21 Dec 9, 2024
fc6d6f5
lintint
khushijain21 Dec 9, 2024
1c54a32
fix tls test
khushijain21 Dec 9, 2024
136747c
tls logic refactoring
khushijain21 Dec 9, 2024
fc8b67b
linting errors
khushijain21 Dec 9, 2024
b8070e0
otel binary test
khushijain21 Dec 11, 2024
34d05c9
Merge remote-tracking branch 'upstream/main' into fosb1
khushijain21 Dec 11, 2024
15ff78a
notice
khushijain21 Dec 11, 2024
bc9cda6
es test fix
khushijain21 Dec 11, 2024
276afe9
changed otelcommon to otelbeat
khushijain21 Dec 12, 2024
67c9308
move otel.go to x-pack/libbeat
khushijain21 Dec 12, 2024
7dc0537
uncomment logs_index
khushijain21 Dec 12, 2024
b09c5d3
build errors
khushijain21 Dec 12, 2024
8f31a23
refactoring
khushijain21 Dec 12, 2024
6c47665
commented batcher functionality as it is experimental
khushijain21 Dec 16, 2024
21654a6
Merge remote-tracking branch 'upstream/main' into fosb1
khushijain21 Dec 16, 2024
8f24b22
moved filebeat-yml out of cmd subdirectory
khushijain21 Dec 17, 2024
4eb3605
nit
khushijain21 Dec 17, 2024
57a5b93
Update libbeat/outputs/elasticsearch/config_otel.go
khushijain21 Dec 17, 2024
54c48c8
refactoring es config translation
khushijain21 Dec 18, 2024
3ffc4df
addressing review comments
khushijain21 Dec 18, 2024
f1db388
Merge remote-tracking branch 'upstream/main' into fosb1
khushijain21 Dec 18, 2024
f000986
correct the test
khushijain21 Dec 18, 2024
8f7f2fb
add failure if multiple o/p are configured
khushijain21 Dec 18, 2024
cd679ad
embedd test files
khushijain21 Dec 18, 2024
a399fef
remove redundant test case
khushijain21 Dec 18, 2024
b8b5917
default filebeat-otel.yml change
khushijain21 Dec 18, 2024
af5ee52
add support for cloud-id
khushijain21 Dec 19, 2024
2870c08
remove debug statements
khushijain21 Dec 19, 2024
7f98ce0
Merge branch 'main' into fosb1
khushijain21 Dec 19, 2024
225f9d7
Merge remote-tracking branch 'refs/remotes/upstream/main' into fosb1
khushijain21 Dec 31, 2024
941ca15
update
khushijain21 Dec 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
move otel.go to x-pack/libbeat
khushijain21 committed Dec 12, 2024
commit 67c9308872ae80c39d98f2622aef70551c0bd6b8
72 changes: 0 additions & 72 deletions x-pack/filebeat/cmd/components.go

This file was deleted.

1 change: 0 additions & 1 deletion x-pack/filebeat/cmd/filebeat-otel.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ output:
index: form-otel-exporter



setup.template.name: form-otel-exporter
setup.template.pattern: form-otel-exporter
setup.dashboards.index: "form-otel-exporter*"
42 changes: 0 additions & 42 deletions x-pack/filebeat/cmd/otel.go

This file was deleted.

3 changes: 2 additions & 1 deletion x-pack/filebeat/cmd/otel_test.go
Original file line number Diff line number Diff line change
@@ -9,12 +9,13 @@ import (
"testing"
"time"

"github.com/elastic/beats/v7/x-pack/libbeat/otelbeat"
"github.com/stretchr/testify/require"
)

func TestOtel(t *testing.T) {
// Create the command
cmd := OtelCmd()
cmd := otelbeat.OTelCmd("filebeat")

// Set up a context with a timeout to avoid indefinite blocking
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
3 changes: 2 additions & 1 deletion x-pack/filebeat/cmd/root.go
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ import (
"github.com/elastic/beats/v7/x-pack/filebeat/include"
inputs "github.com/elastic/beats/v7/x-pack/filebeat/input/default-inputs"
"github.com/elastic/beats/v7/x-pack/libbeat/management"
"github.com/elastic/beats/v7/x-pack/libbeat/otelbeat"

// Register the includes.
_ "github.com/elastic/beats/v7/x-pack/libbeat/include"
@@ -40,7 +41,7 @@ func Filebeat() *cmd.BeatsRootCmd {
command.PersistentPreRun = func(cmd *cobra.Command, args []string) {
management.ConfigTransform.SetTransform(filebeatCfg)
}
command.AddCommand(OtelCmd())
command.AddCommand(otelbeat.OTelCmd(fbcmd.Name))
return command
}