Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions x-pack/filebeat/fbreceiver/receiver_leak_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ func TestLeak(t *testing.T) {
},
},
},
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"logging": map[string]any{
"level": "debug",
"selectors": []string{
Expand Down
18 changes: 0 additions & 18 deletions x-pack/filebeat/fbreceiver/receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ func TestNewReceiver(t *testing.T) {
},
},
},
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"logging": map[string]any{
"level": "debug",
"selectors": []string{
Expand Down Expand Up @@ -139,9 +136,6 @@ func benchmarkFactoryWithLogLevel(b *testing.B, level zapcore.Level) {
},
},
},
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"logging": map[string]any{
"level": level.String(),
"selectors": []string{
Expand Down Expand Up @@ -203,9 +197,6 @@ func TestMultipleReceivers(t *testing.T) {
},
},
},
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"logging": map[string]any{
"level": "info",
"selectors": []string{
Expand Down Expand Up @@ -370,9 +361,6 @@ func TestReceiverDegraded(t *testing.T) {
},
},
},
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"logging": map[string]any{
"level": "debug",
"selectors": []string{
Expand Down Expand Up @@ -569,9 +557,6 @@ func TestConsumeContract(t *testing.T) {
},
},
},
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"logging": map[string]any{
"level": "debug",
"selectors": []string{
Expand Down Expand Up @@ -607,9 +592,6 @@ func TestReceiverHook(t *testing.T) {
},
},
},
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"management.otel.enabled": true,
"path.home": t.TempDir(),
},
Expand Down
4 changes: 0 additions & 4 deletions x-pack/filebeat/tests/integration/otel_lsexporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ processors:
- %s
prospector.scanner.fingerprint.enabled: false
file_identity.native: ~
output:
otelconsumer:
processors:
- add_host_metadata: ~
- add_fields:
Expand Down Expand Up @@ -209,8 +207,6 @@ func TestLogstashExporterProxyURL(t *testing.T) {
- %s
prospector.scanner.fingerprint.enabled: false
file_identity.native: ~
output:
otelconsumer:
processors:
- add_host_metadata: ~
- add_fields:
Expand Down
12 changes: 0 additions & 12 deletions x-pack/filebeat/tests/integration/otel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ func TestFilebeatOTelE2E(t *testing.T) {
- %s
prospector.scanner.fingerprint.enabled: false
file_identity.native: ~
output:
otelconsumer:
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
Expand Down Expand Up @@ -249,8 +247,6 @@ processors:
- type: httpjson
id: httpjson-e2e-otel
request.url: http://localhost:8090/test
output:
otelconsumer:
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
Expand Down Expand Up @@ -449,8 +445,6 @@ func TestFilebeatOTelReceiverE2E(t *testing.T) {
- {{.InputFile}}
prospector.scanner.fingerprint.enabled: false
file_identity.native: ~
output:
otelconsumer:
logging:
level: info
selectors:
Expand Down Expand Up @@ -638,8 +632,6 @@ func TestFilebeatOTelMultipleReceiversE2E(t *testing.T) {
- {{$receiver.InputFile}}
prospector.scanner.fingerprint.enabled: false
file_identity.native: ~
output:
otelconsumer:
logging:
level: info
selectors:
Expand Down Expand Up @@ -987,8 +979,6 @@ func TestFilebeatOTelDocumentLevelRetries(t *testing.T) {
- {{.InputFile}}
prospector.scanner.fingerprint.enabled: false
file_identity.native: ~
output:
otelconsumer:
logging:
level: debug
queue.mem.flush.timeout: 0s
Expand Down Expand Up @@ -1170,8 +1160,6 @@ func TestFileBeatKerberos(t *testing.T) {
- {{.InputFile}}
prospector.scanner.fingerprint.enabled: false
file_identity.native: ~
output:
otelconsumer:
queue.mem.flush.timeout: 0s
management.otel.enabled: true
path.home: {{.PathHome}}
Expand Down
20 changes: 5 additions & 15 deletions x-pack/libbeat/cmd/instance/beat.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ func NewBeatForReceiver(settings instance.Settings, receiverConfig map[string]an
ucfg.VarExp,
}

// all beatreceivers will use otelconsumer output by default
receiverConfig["output"] = map[string]any{
"otelconsumer": map[string]any{},
}

tmp, err := ucfg.NewFrom(receiverConfig, cfOpts...)
if err != nil {
return nil, fmt.Errorf("error converting receiver config to ucfg: %w", err)
Expand Down Expand Up @@ -155,10 +160,6 @@ func NewBeatForReceiver(settings instance.Settings, receiverConfig map[string]an
}
b.Instrumentation = instrumentation

if err := instance.PromoteOutputQueueSettings(b); err != nil {
return nil, fmt.Errorf("could not promote output queue settings: %w", err)
}

if err := features.UpdateFromConfig(b.RawConfig); err != nil {
return nil, fmt.Errorf("could not parse features: %w", err)
}
Expand Down Expand Up @@ -261,17 +262,6 @@ func NewBeatForReceiver(settings instance.Settings, receiverConfig map[string]an
}
b.SetProcessors(processors)

// This should be replaced with static config for otel consumer
// but need to figure out if we want the Queue settings from here.
outputEnabled := b.Config.Output.IsSet() && b.Config.Output.Config().Enabled()
if !outputEnabled {
if b.Manager.Enabled() {
logger.Info("Output is configured through Central Management")
} else {
return nil, fmt.Errorf("no outputs are defined, please define one under the output section")
}
}

reg := b.Monitoring.StatsRegistry().GetOrCreateRegistry("libbeat")

monitors := pipeline.Monitors{
Expand Down
3 changes: 0 additions & 3 deletions x-pack/libbeat/cmd/instance/beat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ func TestManager(t *testing.T) {
},
},
},
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"path.home": tmpDir,
}
t.Run("otel management disabled - key missing", func(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ func TestNew(t *testing.T) {
message: "test message"
count: 1
processors: ~
output:
otelconsumer:
logging:
level: debug
queue.mem.flush.timeout: 0s
Expand Down
3 changes: 0 additions & 3 deletions x-pack/metricbeat/mbreceiver/receiver_leak_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ func TestLeak(t *testing.T) {
},
},
},
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"logging": map[string]any{
"level": "debug",
"selectors": []string{
Expand Down
20 changes: 1 addition & 19 deletions x-pack/metricbeat/mbreceiver/receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ func TestNewReceiver(t *testing.T) {
},
},
},
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"logging": map[string]any{
"level": "debug",
"selectors": []string{
Expand Down Expand Up @@ -139,9 +136,6 @@ func TestMultipleReceivers(t *testing.T) {
},
},
},
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"logging": map[string]any{
"level": "debug",
"selectors": []string{
Expand All @@ -167,9 +161,6 @@ func TestMultipleReceivers(t *testing.T) {
},
},
},
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"logging": map[string]any{
"level": "debug",
"selectors": []string{
Expand Down Expand Up @@ -336,9 +327,6 @@ func BenchmarkFactory(b *testing.B) {
},
},
},
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"logging": map[string]any{
"level": "info",
"selectors": []string{
Expand Down Expand Up @@ -407,9 +395,6 @@ func TestReceiverDegraded(t *testing.T) {
},
},
},
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"path.home": t.TempDir(),
},
}
Expand Down Expand Up @@ -444,10 +429,7 @@ func TestReceiverHook(t *testing.T) {
},
},
"management.otel.enabled": true,
"output": map[string]any{
"otelconsumer": map[string]any{},
},
"path.home": t.TempDir(),
"path.home": t.TempDir(),
},
}
receiverSettings := receiver.Settings{
Expand Down
6 changes: 0 additions & 6 deletions x-pack/metricbeat/tests/integration/otel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ func TestMetricbeatOTelE2E(t *testing.T) {
- '.*'
metricsets:
- cpu
output:
otelconsumer:
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
Expand Down Expand Up @@ -265,8 +263,6 @@ func TestMetricbeatOTelReceiverE2E(t *testing.T) {
- '.*'
metricsets:
- cpu
output:
otelconsumer:
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
Expand Down Expand Up @@ -461,8 +457,6 @@ func TestMetricbeatOTelMultipleReceiversE2E(t *testing.T) {
target: ''
fields:
receiverid: "{{$i}}"
output:
otelconsumer:
logging:
level: info
selectors:
Expand Down
8 changes: 0 additions & 8 deletions x-pack/otel/processor/beatprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ receivers:
id: host-logs
paths:
- /var/log/*.log
output:
otelconsumer:
```

The above Filebeat receiver configuration does not explicitly specify the `processors` option.
Expand All @@ -58,8 +56,6 @@ receivers:
paths:
- /var/log/*.log
processors: []
output:
otelconsumer:
```

The above Filebeat receiver configuration specifies an empty list of processors.
Expand All @@ -82,8 +78,6 @@ receivers:
- add_host_metadata:
netinfo:
enabled: false
output:
otelconsumer:
```

is functionally equivalent to this one, using the Beat processor:
Expand All @@ -98,8 +92,6 @@ receivers:
paths:
- /var/log/*.log
processors: []
output:
otelconsumer:

processors:
beat:
Expand Down
4 changes: 0 additions & 4 deletions x-pack/otel/processor/beatprocessor/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ receivers:
- {{.InputFile}}
prospector.scanner.fingerprint.enabled: false
file_identity.native: ~
output:
otelconsumer:
processors:
# Configure a processor to prevent enabling default processors
- add_fields:
Expand Down Expand Up @@ -161,8 +159,6 @@ receivers:
fields:
custom_field: "custom_value"
- add_host_metadata:
output:
otelconsumer:
logging:
level: info
selectors:
Expand Down