Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -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

Expand Down
30 changes: 30 additions & 0 deletions libbeat/otel/otelconsumer/config.go
Original file line number Diff line number Diff line change
@@ -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{}
}
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -14,10 +27,10 @@ import (

"github.com/elastic/beats/v7/libbeat/beat"
"github.com/elastic/beats/v7/libbeat/common"
"github.com/elastic/beats/v7/libbeat/otel/otelctx"
"github.com/elastic/beats/v7/libbeat/otel/otelmap"
"github.com/elastic/beats/v7/libbeat/outputs"
"github.com/elastic/beats/v7/libbeat/publisher"
"github.com/elastic/beats/v7/x-pack/otel/otelctx"
"github.com/elastic/beats/v7/x-pack/otel/otelmap"
"github.com/elastic/elastic-agent-libs/config"
"github.com/elastic/elastic-agent-libs/logp"
"github.com/elastic/elastic-agent-libs/mapstr"
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -22,9 +35,9 @@ import (
"go.opentelemetry.io/collector/receiver/receivertest"

"github.com/elastic/beats/v7/libbeat/beat"
"github.com/elastic/beats/v7/libbeat/otel/otelctx"
"github.com/elastic/beats/v7/libbeat/outputs"
"github.com/elastic/beats/v7/libbeat/outputs/outest"
"github.com/elastic/beats/v7/x-pack/otel/otelctx"
"github.com/elastic/elastic-agent-libs/logp/logptest"
"github.com/elastic/elastic-agent-libs/mapstr"
"github.com/elastic/elastic-agent-libs/monitoring"
Expand Down
Original file line number Diff line number Diff line change
@@ -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 otelctx

Expand Down
Original file line number Diff line number Diff line change
@@ -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 otelctx

Expand Down
Original file line number Diff line number Diff line change
@@ -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 otelmap provides utilities for converting between beats and otel map types.
package otelmap
Expand Down
Original file line number Diff line number Diff line change
@@ -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 otelmap

Expand Down
1 change: 1 addition & 0 deletions libbeat/publisher/includes/includes.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package includes

import (
// import queue types
_ "github.com/elastic/beats/v7/libbeat/otel/otelconsumer"
_ "github.com/elastic/beats/v7/libbeat/outputs/codec/format"
_ "github.com/elastic/beats/v7/libbeat/outputs/codec/json"
_ "github.com/elastic/beats/v7/libbeat/outputs/console"
Expand Down
3 changes: 0 additions & 3 deletions x-pack/libbeat/include/include.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
17 changes: 0 additions & 17 deletions x-pack/libbeat/outputs/otelconsumer/config.go

This file was deleted.

2 changes: 1 addition & 1 deletion x-pack/otel/exporter/logstashexporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (

"github.com/elastic/beats/v7/libbeat/outputs"

"github.com/elastic/beats/v7/libbeat/otel/otelctx"
"github.com/elastic/beats/v7/libbeat/outputs/logstash"
"github.com/elastic/beats/v7/x-pack/otel/exporter/logstashexporter/internal"
"github.com/elastic/beats/v7/x-pack/otel/otelctx"
"github.com/elastic/elastic-agent-libs/config"
"github.com/elastic/elastic-agent-libs/logp"
"github.com/elastic/elastic-agent-libs/transport"
Expand Down
2 changes: 1 addition & 1 deletion x-pack/otel/exporter/logstashexporter/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"go.opentelemetry.io/collector/pdata/plog"

"github.com/elastic/beats/v7/libbeat/beat"
"github.com/elastic/beats/v7/libbeat/otel/otelctx"
"github.com/elastic/beats/v7/libbeat/publisher"
"github.com/elastic/beats/v7/x-pack/otel/exporter/logstashexporter/internal"
"github.com/elastic/beats/v7/x-pack/otel/otelctx"
"github.com/elastic/elastic-agent-libs/transport"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"go.opentelemetry.io/collector/pdata/plog"

"github.com/elastic/beats/v7/libbeat/beat"
"github.com/elastic/beats/v7/libbeat/otel/otelctx"
"github.com/elastic/beats/v7/libbeat/publisher"
"github.com/elastic/beats/v7/x-pack/otel/otelctx"
)

func TestNewLogBatch(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/otel/exporter/logstashexporter/internal/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"go.opentelemetry.io/collector/pdata/plog"

"github.com/elastic/beats/v7/libbeat/beat"
"github.com/elastic/beats/v7/x-pack/otel/otelctx"
"github.com/elastic/beats/v7/libbeat/otel/otelctx"
)

func parseEvent(ctx context.Context, logRecord *plog.LogRecord) (beat.Event, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"go.opentelemetry.io/collector/pdata/plog"

"github.com/elastic/beats/v7/libbeat/beat"
"github.com/elastic/beats/v7/x-pack/otel/otelctx"
"github.com/elastic/beats/v7/libbeat/otel/otelctx"
)

func TestParseEvent(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/otel/processor/beatprocessor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ import (
"go.opentelemetry.io/collector/component"

"github.com/elastic/beats/v7/libbeat/beat"
"github.com/elastic/beats/v7/libbeat/otel/otelmap"
"github.com/elastic/beats/v7/libbeat/processors/actions/addfields"
"github.com/elastic/beats/v7/libbeat/processors/add_cloud_metadata"
"github.com/elastic/beats/v7/libbeat/processors/add_docker_metadata"
"github.com/elastic/beats/v7/libbeat/processors/add_host_metadata"
"github.com/elastic/beats/v7/libbeat/processors/add_kubernetes_metadata"
"github.com/elastic/beats/v7/x-pack/otel/otelmap"
"github.com/elastic/elastic-agent-libs/config"
"github.com/elastic/elastic-agent-libs/logp"
"github.com/elastic/elastic-agent-libs/mapstr"
Expand Down
Loading