diff --git a/libbeat/publisher/includes/includes.go b/libbeat/publisher/includes/includes.go index ccb69d8e475f..50395e554c2a 100644 --- a/libbeat/publisher/includes/includes.go +++ b/libbeat/publisher/includes/includes.go @@ -28,6 +28,7 @@ import ( _ "github.com/elastic/beats/v7/libbeat/outputs/kafka" _ "github.com/elastic/beats/v7/libbeat/outputs/logstash" _ "github.com/elastic/beats/v7/libbeat/outputs/redis" + _ "github.com/elastic/beats/v7/libbeat/publisher/pipeline/otelconsumer" _ "github.com/elastic/beats/v7/libbeat/publisher/queue/diskqueue" _ "github.com/elastic/beats/v7/libbeat/publisher/queue/memqueue" ) diff --git a/x-pack/libbeat/outputs/otelconsumer/benchmark_test.go b/libbeat/publisher/pipeline/otelconsumer/benchmark_test.go similarity index 64% rename from x-pack/libbeat/outputs/otelconsumer/benchmark_test.go rename to libbeat/publisher/pipeline/otelconsumer/benchmark_test.go index e28cb702c1cf..4df9699df6fb 100644 --- a/x-pack/libbeat/outputs/otelconsumer/benchmark_test.go +++ b/libbeat/publisher/pipeline/otelconsumer/benchmark_test.go @@ -1,6 +1,19 @@ -// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one -// or more contributor license agreements. Licensed under the Elastic License; -// you may not use this file except in compliance with the Elastic License. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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. package otelconsumer diff --git a/libbeat/publisher/pipeline/otelconsumer/config.go b/libbeat/publisher/pipeline/otelconsumer/config.go new file mode 100644 index 000000000000..d8281c1aedbc --- /dev/null +++ b/libbeat/publisher/pipeline/otelconsumer/config.go @@ -0,0 +1,30 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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. + +package otelconsumer + +import ( + "github.com/elastic/elastic-agent-libs/config" +) + +type otelConsumerConfig struct { + Queue config.Namespace `config:"queue"` +} + +func defaultConfig() otelConsumerConfig { + return otelConsumerConfig{} +} diff --git a/x-pack/libbeat/outputs/otelconsumer/otelconsumer.go b/libbeat/publisher/pipeline/otelconsumer/otelconsumer.go similarity index 90% rename from x-pack/libbeat/outputs/otelconsumer/otelconsumer.go rename to libbeat/publisher/pipeline/otelconsumer/otelconsumer.go index 9d90131356aa..5dba8a1d5ef2 100644 --- a/x-pack/libbeat/outputs/otelconsumer/otelconsumer.go +++ b/libbeat/publisher/pipeline/otelconsumer/otelconsumer.go @@ -1,6 +1,19 @@ -// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one -// or more contributor license agreements. Licensed under the Elastic License; -// you may not use this file except in compliance with the Elastic License. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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. package otelconsumer diff --git a/x-pack/libbeat/outputs/otelconsumer/otelconsumer_test.go b/libbeat/publisher/pipeline/otelconsumer/otelconsumer_test.go similarity index 94% rename from x-pack/libbeat/outputs/otelconsumer/otelconsumer_test.go rename to libbeat/publisher/pipeline/otelconsumer/otelconsumer_test.go index 16a629db4f00..29e5d2f25fc1 100644 --- a/x-pack/libbeat/outputs/otelconsumer/otelconsumer_test.go +++ b/libbeat/publisher/pipeline/otelconsumer/otelconsumer_test.go @@ -1,6 +1,19 @@ -// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one -// or more contributor license agreements. Licensed under the Elastic License; -// you may not use this file except in compliance with the Elastic License. +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you 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. package otelconsumer diff --git a/x-pack/libbeat/include/include.go b/x-pack/libbeat/include/include.go index 7e95f9474656..bf61ff599d92 100644 --- a/x-pack/libbeat/include/include.go +++ b/x-pack/libbeat/include/include.go @@ -16,7 +16,4 @@ import ( _ "github.com/elastic/beats/v7/x-pack/libbeat/autodiscover/providers/aws/ec2" _ "github.com/elastic/beats/v7/x-pack/libbeat/autodiscover/providers/aws/elb" _ "github.com/elastic/beats/v7/x-pack/libbeat/autodiscover/providers/nomad" - - // register outputs - _ "github.com/elastic/beats/v7/x-pack/libbeat/outputs/otelconsumer" ) diff --git a/x-pack/libbeat/outputs/otelconsumer/config.go b/x-pack/libbeat/outputs/otelconsumer/config.go deleted file mode 100644 index 37fed24167a0..000000000000 --- a/x-pack/libbeat/outputs/otelconsumer/config.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one -// or more contributor license agreements. Licensed under the Elastic License; -// you may not use this file except in compliance with the Elastic License. - -package otelconsumer - -import ( - "github.com/elastic/elastic-agent-libs/config" -) - -type otelConsumerConfig struct { - Queue config.Namespace `config:"queue"` -} - -func defaultConfig() otelConsumerConfig { - return otelConsumerConfig{} -}