From c2c20b2ce68f45e4df5127deda69764d8e730dd6 Mon Sep 17 00:00:00 2001 From: Vishal Raj Date: Mon, 15 Jul 2024 18:25:29 +0100 Subject: [PATCH 1/6] Add elastictraceprocessor for enriching traces --- processor/elastictraceprocessor/Makefile | 1 + processor/elastictraceprocessor/doc.go | 21 +++ processor/elastictraceprocessor/factory.go | 44 +++++ .../generated_component_test.go | 152 ++++++++++++++++++ .../generated_package_test.go | 29 ++++ processor/elastictraceprocessor/go.mod | 64 ++++++++ processor/elastictraceprocessor/go.sum | 152 ++++++++++++++++++ .../internal/metadata/generated_status.go | 32 ++++ processor/elastictraceprocessor/metadata.yaml | 8 + processor/elastictraceprocessor/processor.go | 60 +++++++ .../elastictraceprocessor/processor_test.go | 73 +++++++++ .../testdata/elastic_span_db/input.yaml | 45 ++++++ .../testdata/elastic_span_db/output.yaml | 56 +++++++ .../testdata/elastic_span_http/input.yaml | 47 ++++++ .../testdata/elastic_span_http/output.yaml | 59 +++++++ .../elastic_span_messaging/input.yaml | 44 +++++ .../elastic_span_messaging/output.yaml | 56 +++++++ .../testdata/elastic_txn_db/input.yaml | 44 +++++ .../testdata/elastic_txn_db/output.yaml | 56 +++++++ .../testdata/elastic_txn_http/input.yaml | 47 ++++++ .../testdata/elastic_txn_http/output.yaml | 59 +++++++ .../testdata/elastic_txn_messaging/input.yaml | 44 +++++ .../elastic_txn_messaging/output.yaml | 56 +++++++ 23 files changed, 1249 insertions(+) create mode 100644 processor/elastictraceprocessor/Makefile create mode 100644 processor/elastictraceprocessor/doc.go create mode 100644 processor/elastictraceprocessor/factory.go create mode 100644 processor/elastictraceprocessor/generated_component_test.go create mode 100644 processor/elastictraceprocessor/generated_package_test.go create mode 100644 processor/elastictraceprocessor/go.mod create mode 100644 processor/elastictraceprocessor/go.sum create mode 100644 processor/elastictraceprocessor/internal/metadata/generated_status.go create mode 100644 processor/elastictraceprocessor/metadata.yaml create mode 100644 processor/elastictraceprocessor/processor.go create mode 100644 processor/elastictraceprocessor/processor_test.go create mode 100644 processor/elastictraceprocessor/testdata/elastic_span_db/input.yaml create mode 100644 processor/elastictraceprocessor/testdata/elastic_span_db/output.yaml create mode 100644 processor/elastictraceprocessor/testdata/elastic_span_http/input.yaml create mode 100644 processor/elastictraceprocessor/testdata/elastic_span_http/output.yaml create mode 100644 processor/elastictraceprocessor/testdata/elastic_span_messaging/input.yaml create mode 100644 processor/elastictraceprocessor/testdata/elastic_span_messaging/output.yaml create mode 100644 processor/elastictraceprocessor/testdata/elastic_txn_db/input.yaml create mode 100644 processor/elastictraceprocessor/testdata/elastic_txn_db/output.yaml create mode 100644 processor/elastictraceprocessor/testdata/elastic_txn_http/input.yaml create mode 100644 processor/elastictraceprocessor/testdata/elastic_txn_http/output.yaml create mode 100644 processor/elastictraceprocessor/testdata/elastic_txn_messaging/input.yaml create mode 100644 processor/elastictraceprocessor/testdata/elastic_txn_messaging/output.yaml diff --git a/processor/elastictraceprocessor/Makefile b/processor/elastictraceprocessor/Makefile new file mode 100644 index 00000000..ded7a360 --- /dev/null +++ b/processor/elastictraceprocessor/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/processor/elastictraceprocessor/doc.go b/processor/elastictraceprocessor/doc.go new file mode 100644 index 00000000..ecba8e0d --- /dev/null +++ b/processor/elastictraceprocessor/doc.go @@ -0,0 +1,21 @@ +// 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. + +//go:generate mdatagen metadata.yaml + +// Package elastictraceprocessor enriches the traces with Elastic specific attributes. +package elastictraceprocessor // import "github.com/elastic/opentelemetry-collector-components/processor/elastictraceprocessor" diff --git a/processor/elastictraceprocessor/factory.go b/processor/elastictraceprocessor/factory.go new file mode 100644 index 00000000..762c9a1b --- /dev/null +++ b/processor/elastictraceprocessor/factory.go @@ -0,0 +1,44 @@ +// 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 elastictraceprocessor // import "github.com/elastic/opentelemetry-collector-components/processor/elastictraceprocessor" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/processor" + + "github.com/elastic/opentelemetry-collector-components/processor/elastictraceprocessor/internal/metadata" +) + +// NewFactory returns a processor.Factory that constructs elastic +// trace processor instances. +func NewFactory() processor.Factory { + return processor.NewFactory( + metadata.Type, + func() component.Config { return &struct{}{} }, + processor.WithTraces(createTraces, metadata.TracesStability), + ) +} + +func createTraces( + _ context.Context, set processor.Settings, _ component.Config, next consumer.Traces, +) (processor.Traces, error) { + return newProcessor(set.Logger, next), nil +} diff --git a/processor/elastictraceprocessor/generated_component_test.go b/processor/elastictraceprocessor/generated_component_test.go new file mode 100644 index 00000000..4e2da0c1 --- /dev/null +++ b/processor/elastictraceprocessor/generated_component_test.go @@ -0,0 +1,152 @@ +// 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. + +// Code generated by mdatagen. DO NOT EDIT. + +package elastictraceprocessor + +import ( + "context" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.opentelemetry.io/collector/processor/processortest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "elatictrace", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set processor.Settings, cfg component.Config) (component.Component, error) + }{ + + { + name: "traces", + createFn: func(ctx context.Context, set processor.Settings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesProcessor(ctx, set, cfg, consumertest.NewNop()) + }, + }, + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, sub.Unmarshal(&cfg)) + + for _, test := range tests { + t.Run(test.name+"-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(test.name+"-lifecycle", func(t *testing.T) { + c, err := test.createFn(context.Background(), processortest.NewNopSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + err = c.Start(context.Background(), host) + require.NoError(t, err) + require.NotPanics(t, func() { + switch test.name { + case "logs": + e, ok := c.(processor.Logs) + require.True(t, ok) + logs := generateLifecycleTestLogs() + if !e.Capabilities().MutatesData { + logs.MarkReadOnly() + } + err = e.ConsumeLogs(context.Background(), logs) + case "metrics": + e, ok := c.(processor.Metrics) + require.True(t, ok) + metrics := generateLifecycleTestMetrics() + if !e.Capabilities().MutatesData { + metrics.MarkReadOnly() + } + err = e.ConsumeMetrics(context.Background(), metrics) + case "traces": + e, ok := c.(processor.Traces) + require.True(t, ok) + traces := generateLifecycleTestTraces() + if !e.Capabilities().MutatesData { + traces.MarkReadOnly() + } + err = e.ConsumeTraces(context.Background(), traces) + } + }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + } +} + +func generateLifecycleTestLogs() plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + rl.Resource().Attributes().PutStr("resource", "R1") + l := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + l.Body().SetStr("test log message") + l.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return logs +} + +func generateLifecycleTestMetrics() pmetric.Metrics { + metrics := pmetric.NewMetrics() + rm := metrics.ResourceMetrics().AppendEmpty() + rm.Resource().Attributes().PutStr("resource", "R1") + m := rm.ScopeMetrics().AppendEmpty().Metrics().AppendEmpty() + m.SetName("test_metric") + dp := m.SetEmptyGauge().DataPoints().AppendEmpty() + dp.Attributes().PutStr("test_attr", "value_1") + dp.SetIntValue(123) + dp.SetTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return metrics +} + +func generateLifecycleTestTraces() ptrace.Traces { + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + rs.Resource().Attributes().PutStr("resource", "R1") + span := rs.ScopeSpans().AppendEmpty().Spans().AppendEmpty() + span.Attributes().PutStr("test_attr", "value_1") + span.SetName("test_span") + span.SetStartTimestamp(pcommon.NewTimestampFromTime(time.Now().Add(-1 * time.Second))) + span.SetEndTimestamp(pcommon.NewTimestampFromTime(time.Now())) + return traces +} diff --git a/processor/elastictraceprocessor/generated_package_test.go b/processor/elastictraceprocessor/generated_package_test.go new file mode 100644 index 00000000..7813f90f --- /dev/null +++ b/processor/elastictraceprocessor/generated_package_test.go @@ -0,0 +1,29 @@ +// 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. + +// Code generated by mdatagen. DO NOT EDIT. + +package elastictraceprocessor + +import ( + "go.uber.org/goleak" + "testing" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/processor/elastictraceprocessor/go.mod b/processor/elastictraceprocessor/go.mod new file mode 100644 index 00000000..0b4dec52 --- /dev/null +++ b/processor/elastictraceprocessor/go.mod @@ -0,0 +1,64 @@ +module github.com/elastic/opentelemetry-collector-components/processor/elastictraceprocessor + +go 1.22.4 + +require ( + github.com/elastic/opentelemetry-lib v0.7.3 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.104.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.104.0 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.104.0 + go.opentelemetry.io/collector/confmap v0.104.0 + go.opentelemetry.io/collector/consumer v0.104.0 + go.opentelemetry.io/collector/pdata v1.11.0 + go.opentelemetry.io/collector/processor v0.104.0 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 +) + +require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.1.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.104.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.54.0 // indirect + github.com/prometheus/procfs v0.15.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect + go.opentelemetry.io/collector/featuregate v1.11.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.104.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.104.0 // indirect + go.opentelemetry.io/collector/semconv v0.104.0 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/metric v1.28.0 // indirect + go.opentelemetry.io/otel/sdk v1.28.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.27.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/grpc v1.65.0 // indirect + google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace github.com/elastic/opentelemetry-lib => /Users/lahsivjar/Projects/elastic/opentelemetry-lib diff --git a/processor/elastictraceprocessor/go.sum b/processor/elastictraceprocessor/go.sum new file mode 100644 index 00000000..74b6b704 --- /dev/null +++ b/processor/elastictraceprocessor/go.sum @@ -0,0 +1,152 @@ +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= +github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= +github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.104.0 h1:J4VwD+t7XpMuhdgd5KwhI5f17bOKHDD862szUW2ulVo= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.104.0/go.mod h1:MYspCVghl0glPIWT/gca6hXL48fROuJxo7lkEB171Ws= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.104.0 h1:bgS1X1UnUuYfKXsQPq3U50jsMNpN5lI+BcDeklPJOW8= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.104.0/go.mod h1:tImy4FWNu1qpaXRVaNi2BU+TmZHtYgLO6LbB6mspZio= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.104.0 h1:Pl4rXXpRG/xJuNWUS3I/w1jViHcrssMf47bGX/Ug/KY= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.104.0/go.mod h1:tP4dyc5+g/qoXYb8lmNj+y+Nhphn4MkL23/np0Zhx2g= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= +github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= +github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= +github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/collector/component v0.104.0 h1:jqu/X9rnv8ha0RNZ1a9+x7OU49KwSMsPbOuIEykHuQE= +go.opentelemetry.io/collector/component v0.104.0/go.mod h1:1C7C0hMVSbXyY1ycCmaMUAR9fVwpgyiNQqxXtEWhVpw= +go.opentelemetry.io/collector/config/configtelemetry v0.104.0 h1:eHv98XIhapZA8MgTiipvi+FDOXoFhCYOwyKReOt+E4E= +go.opentelemetry.io/collector/config/configtelemetry v0.104.0/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= +go.opentelemetry.io/collector/confmap v0.104.0 h1:d3yuwX+CHpoyCh0iMv3rqb/vwAekjSm4ZDL6UK1nZSA= +go.opentelemetry.io/collector/confmap v0.104.0/go.mod h1:F8Lue+tPPn2oldXcfqI75PPMJoyzgUsKVtM/uHZLA4w= +go.opentelemetry.io/collector/consumer v0.104.0 h1:Z1ZjapFp5mUcbkGEL96ljpqLIUMhRgQQpYKkDRtxy+4= +go.opentelemetry.io/collector/consumer v0.104.0/go.mod h1:60zcIb0W9GW0z9uJCv6NmjpSbCfBOeRUyrtEwqK6Hzo= +go.opentelemetry.io/collector/featuregate v1.11.0 h1:Z7puIymKoQRm3oNM/NH8reWc2zRPz2PNaJvuokh0lQY= +go.opentelemetry.io/collector/featuregate v1.11.0/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U= +go.opentelemetry.io/collector/pdata v1.11.0 h1:rzYyV1zfTQQz1DI9hCiaKyyaczqawN75XO9mdXmR/hE= +go.opentelemetry.io/collector/pdata v1.11.0/go.mod h1:IHxHsp+Jq/xfjORQMDJjSH6jvedOSTOyu3nbxqhWSYE= +go.opentelemetry.io/collector/pdata/pprofile v0.104.0 h1:MYOIHvPlKEJbWLiBKFQWGD0xd2u22xGVLt4jPbdxP4Y= +go.opentelemetry.io/collector/pdata/pprofile v0.104.0/go.mod h1:7WpyHk2wJZRx70CGkBio8klrYTTXASbyIhf+rH4FKnA= +go.opentelemetry.io/collector/pdata/testdata v0.104.0 h1:BKTZ7hIyAX5DMPecrXkVB2e86HwWtJyOlXn/5vSVXNw= +go.opentelemetry.io/collector/pdata/testdata v0.104.0/go.mod h1:3SnYKu8gLfxURJMWS/cFEUFs+jEKS6jvfqKXnOZsdkQ= +go.opentelemetry.io/collector/processor v0.104.0 h1:KSvMDu4DWmK1/k2z2rOzMtTvAa00jnTabtPEK9WOSYI= +go.opentelemetry.io/collector/processor v0.104.0/go.mod h1:qU2/xCCYdvVORkN6aq0H/WUWkvo505VGYg2eOwPvaTg= +go.opentelemetry.io/collector/semconv v0.104.0 h1:dUvajnh+AYJLEW/XOPk0T0BlwltSdi3vrjO7nSOos3k= +go.opentelemetry.io/collector/semconv v0.104.0/go.mod h1:yMVUCNoQPZVq/IPfrHrnntZTWsLf5YGZ7qwKulIl5hw= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= +go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= +go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= +go.opentelemetry.io/otel/sdk v1.28.0/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnCQArXCKlg08= +go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/processor/elastictraceprocessor/internal/metadata/generated_status.go b/processor/elastictraceprocessor/internal/metadata/generated_status.go new file mode 100644 index 00000000..4724d463 --- /dev/null +++ b/processor/elastictraceprocessor/internal/metadata/generated_status.go @@ -0,0 +1,32 @@ +// 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. + +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("elatictrace") +) + +const ( + TracesStability = component.StabilityLevelDevelopment +) diff --git a/processor/elastictraceprocessor/metadata.yaml b/processor/elastictraceprocessor/metadata.yaml new file mode 100644 index 00000000..2fc8d339 --- /dev/null +++ b/processor/elastictraceprocessor/metadata.yaml @@ -0,0 +1,8 @@ +type: elatictrace +scope_name: otelcol/elastictrace + +status: + class: processor + stability: + development: [traces] + distributions: [] diff --git a/processor/elastictraceprocessor/processor.go b/processor/elastictraceprocessor/processor.go new file mode 100644 index 00000000..3a4d5fb2 --- /dev/null +++ b/processor/elastictraceprocessor/processor.go @@ -0,0 +1,60 @@ +// 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 elastictraceprocessor // import "github.com/elastic/opentelemetry-collector-components/processor/elastictraceprocessor" + +import ( + "context" + + "github.com/elastic/opentelemetry-lib/enrichments/trace" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor" + "go.uber.org/zap" +) + +var _ processor.Traces = (*Processor)(nil) + +type Processor struct { + next consumer.Traces + logger *zap.Logger +} + +func newProcessor(logger *zap.Logger, next consumer.Traces) *Processor { + return &Processor{ + next: next, + logger: logger, + } +} + +func (p *Processor) Start(context.Context, component.Host) error { + return nil +} + +func (p *Processor) Shutdown(context.Context) error { + return nil +} + +func (p *Processor) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: true} +} + +func (p *Processor) ConsumeTraces(ctx context.Context, td ptrace.Traces) error { + trace.Enrich(td) + return p.next.ConsumeTraces(ctx, td) +} diff --git a/processor/elastictraceprocessor/processor_test.go b/processor/elastictraceprocessor/processor_test.go new file mode 100644 index 00000000..e6bca852 --- /dev/null +++ b/processor/elastictraceprocessor/processor_test.go @@ -0,0 +1,73 @@ +// 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 elastictraceprocessor // import "github.com/elastic/opentelemetry-collector-components/processor/elastictraceprocessor" + +import ( + "context" + "path/filepath" + "testing" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest/ptracetest" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/processor/processortest" + "go.uber.org/zap/zapcore" + "go.uber.org/zap/zaptest" +) + +// TestProcessor does some basic tests to check if enrichment is happening. +// More exhaustive test for the logic are left to the library. +func TestProcessor(t *testing.T) { + testCases := []string{ + "elastic_txn_http", + "elastic_txn_messaging", + "elastic_txn_db", + + "elastic_span_http", + "elastic_span_messaging", + "elastic_span_db", + } + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + for _, tc := range testCases { + t.Run(tc, func(t *testing.T) { + factory := NewFactory() + settings := processortest.NewNopSettings() + settings.TelemetrySettings.Logger = zaptest.NewLogger(t, zaptest.Level(zapcore.DebugLevel)) + next := &consumertest.TracesSink{} + + tp, err := factory.CreateTracesProcessor(ctx, settings, struct{}{}, next) + + require.NoError(t, err) + require.IsType(t, &Processor{}, tp) + + dir := filepath.Join("testdata", tc) + inputTraces, err := golden.ReadTraces(filepath.Join(dir, "input.yaml")) + require.NoError(t, err) + expectedTraces, err := golden.ReadTraces(filepath.Join(dir, "output.yaml")) + require.NoError(t, err) + + require.NoError(t, tp.ConsumeTraces(ctx, inputTraces)) + assert.NoError(t, ptracetest.CompareTraces(expectedTraces, next.AllTraces()[0])) + }) + } +} diff --git a/processor/elastictraceprocessor/testdata/elastic_span_db/input.yaml b/processor/elastictraceprocessor/testdata/elastic_span_db/input.yaml new file mode 100644 index 00000000..c2c1e962 --- /dev/null +++ b/processor/elastictraceprocessor/testdata/elastic_span_db/input.yaml @@ -0,0 +1,45 @@ +resourceSpans: + - resource: + attributes: + - key: resource.required + value: + stringValue: foo + - key: resource.optional + value: + stringValue: bar + scopeSpans: + - scope: {} + spans: + - attributes: + - key: db.name + value: + stringValue: main + - key: db.system + value: + stringValue: mysql + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo1 + - key: event.attr2 + value: + stringValue: bar1 + name: event1 + timeUnixNano: "1581452773000000123" + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + - name: event-with-no-attrs + timeUnixNano: "1581452773000000123" + name: span-elastic-db + parentSpanId: "bcff497b5a47310f" + startTimeUnixNano: "1581452772000000321" + diff --git a/processor/elastictraceprocessor/testdata/elastic_span_db/output.yaml b/processor/elastictraceprocessor/testdata/elastic_span_db/output.yaml new file mode 100644 index 00000000..74463bb2 --- /dev/null +++ b/processor/elastictraceprocessor/testdata/elastic_span_db/output.yaml @@ -0,0 +1,56 @@ +resourceSpans: + - resource: + attributes: + - key: resource.required + value: + stringValue: foo + - key: resource.optional + value: + stringValue: bar + scopeSpans: + - scope: {} + spans: + - attributes: + - key: db.name + value: + stringValue: main + - key: db.system + value: + stringValue: mysql + - key: event.outcome + value: + stringValue: success + - key: service.target.type + value: + stringValue: mysql + - key: service.target.name + value: + stringValue: main + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo1 + - key: event.attr2 + value: + stringValue: bar1 + name: event1 + timeUnixNano: "1581452773000000123" + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + - name: event-with-no-attrs + timeUnixNano: "1581452773000000123" + name: span-elastic-db + parentSpanId: bcff497b5a47310f + spanId: "" + startTimeUnixNano: "1581452772000000321" + status: {} + traceId: "" diff --git a/processor/elastictraceprocessor/testdata/elastic_span_http/input.yaml b/processor/elastictraceprocessor/testdata/elastic_span_http/input.yaml new file mode 100644 index 00000000..cc8d56cd --- /dev/null +++ b/processor/elastictraceprocessor/testdata/elastic_span_http/input.yaml @@ -0,0 +1,47 @@ +resourceSpans: + - resource: + attributes: + - key: resource.required + value: + stringValue: foo + - key: resource.optional + value: + stringValue: bar + scopeSpans: + - scope: {} + spans: + - attributes: + - key: http.request.method + value: + stringValue: POST + - key: url.full + value: + stringValue: https://www.foo.bar/search?q=OpenTelemetry#SemConv + - key: http.response.status_code + value: + intValue: 201 + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo1 + - key: event.attr2 + value: + stringValue: bar1 + name: event1 + timeUnixNano: "1581452773000000123" + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + - name: event-with-no-attrs + timeUnixNano: "1581452773000000123" + name: span-elastic-http + parentSpanId: "bcff497b5a47310f" + startTimeUnixNano: "1581452772000000321" diff --git a/processor/elastictraceprocessor/testdata/elastic_span_http/output.yaml b/processor/elastictraceprocessor/testdata/elastic_span_http/output.yaml new file mode 100644 index 00000000..aba71218 --- /dev/null +++ b/processor/elastictraceprocessor/testdata/elastic_span_http/output.yaml @@ -0,0 +1,59 @@ +resourceSpans: + - resource: + attributes: + - key: resource.required + value: + stringValue: foo + - key: resource.optional + value: + stringValue: bar + scopeSpans: + - scope: {} + spans: + - attributes: + - key: http.request.method + value: + stringValue: POST + - key: url.full + value: + stringValue: https://www.foo.bar/search?q=OpenTelemetry#SemConv + - key: http.response.status_code + value: + intValue: "201" + - key: event.outcome + value: + stringValue: success + - key: service.target.type + value: + stringValue: http + - key: service.target.name + value: + stringValue: www.foo.bar + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo1 + - key: event.attr2 + value: + stringValue: bar1 + name: event1 + timeUnixNano: "1581452773000000123" + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + - name: event-with-no-attrs + timeUnixNano: "1581452773000000123" + name: span-elastic-http + parentSpanId: bcff497b5a47310f + spanId: "" + startTimeUnixNano: "1581452772000000321" + status: {} + traceId: "" diff --git a/processor/elastictraceprocessor/testdata/elastic_span_messaging/input.yaml b/processor/elastictraceprocessor/testdata/elastic_span_messaging/input.yaml new file mode 100644 index 00000000..a077131e --- /dev/null +++ b/processor/elastictraceprocessor/testdata/elastic_span_messaging/input.yaml @@ -0,0 +1,44 @@ +resourceSpans: + - resource: + attributes: + - key: resource.required + value: + stringValue: foo + - key: resource.optional + value: + stringValue: bar + scopeSpans: + - scope: {} + spans: + - attributes: + - key: messaging.system + value: + stringValue: kafka + - key: messaging.destination.name + value: + stringValue: TestTopic + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo1 + - key: event.attr2 + value: + stringValue: bar1 + name: event1 + timeUnixNano: "1581452773000000123" + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + - name: event-with-no-attrs + timeUnixNano: "1581452773000000123" + name: span-elastic-msg + parentSpanId: "bcff497b5a47310f" + startTimeUnixNano: "1581452772000000321" diff --git a/processor/elastictraceprocessor/testdata/elastic_span_messaging/output.yaml b/processor/elastictraceprocessor/testdata/elastic_span_messaging/output.yaml new file mode 100644 index 00000000..5eb13315 --- /dev/null +++ b/processor/elastictraceprocessor/testdata/elastic_span_messaging/output.yaml @@ -0,0 +1,56 @@ +resourceSpans: + - resource: + attributes: + - key: resource.required + value: + stringValue: foo + - key: resource.optional + value: + stringValue: bar + scopeSpans: + - scope: {} + spans: + - attributes: + - key: messaging.system + value: + stringValue: kafka + - key: messaging.destination.name + value: + stringValue: TestTopic + - key: event.outcome + value: + stringValue: success + - key: service.target.type + value: + stringValue: kafka + - key: service.target.name + value: + stringValue: TestTopic + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo1 + - key: event.attr2 + value: + stringValue: bar1 + name: event1 + timeUnixNano: "1581452773000000123" + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + - name: event-with-no-attrs + timeUnixNano: "1581452773000000123" + name: span-elastic-msg + parentSpanId: bcff497b5a47310f + spanId: "" + startTimeUnixNano: "1581452772000000321" + status: {} + traceId: "" diff --git a/processor/elastictraceprocessor/testdata/elastic_txn_db/input.yaml b/processor/elastictraceprocessor/testdata/elastic_txn_db/input.yaml new file mode 100644 index 00000000..090b014a --- /dev/null +++ b/processor/elastictraceprocessor/testdata/elastic_txn_db/input.yaml @@ -0,0 +1,44 @@ +resourceSpans: + - resource: + attributes: + - key: resource.required + value: + stringValue: foo + - key: resource.optional + value: + stringValue: bar + scopeSpans: + - scope: {} + spans: + - attributes: + - key: db.name + value: + stringValue: main + - key: db.system + value: + stringValue: mysql + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo1 + - key: event.attr2 + value: + stringValue: bar1 + name: event1 + timeUnixNano: "1581452773000000123" + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + - name: event-with-no-attrs + timeUnixNano: "1581452773000000123" + name: db-elastic-txn + parentSpanId: "" + startTimeUnixNano: "1581452772000000321" diff --git a/processor/elastictraceprocessor/testdata/elastic_txn_db/output.yaml b/processor/elastictraceprocessor/testdata/elastic_txn_db/output.yaml new file mode 100644 index 00000000..615e1cc8 --- /dev/null +++ b/processor/elastictraceprocessor/testdata/elastic_txn_db/output.yaml @@ -0,0 +1,56 @@ +resourceSpans: + - resource: + attributes: + - key: resource.required + value: + stringValue: foo + - key: resource.optional + value: + stringValue: bar + scopeSpans: + - scope: {} + spans: + - attributes: + - key: db.name + value: + stringValue: main + - key: db.system + value: + stringValue: mysql + - key: transaction.type + value: + stringValue: unknown + - key: transaction.result + value: + stringValue: Success + - key: event.outcome + value: + stringValue: success + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo1 + - key: event.attr2 + value: + stringValue: bar1 + name: event1 + timeUnixNano: "1581452773000000123" + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + - name: event-with-no-attrs + timeUnixNano: "1581452773000000123" + name: db-elastic-txn + parentSpanId: "" + spanId: "" + startTimeUnixNano: "1581452772000000321" + status: {} + traceId: "" diff --git a/processor/elastictraceprocessor/testdata/elastic_txn_http/input.yaml b/processor/elastictraceprocessor/testdata/elastic_txn_http/input.yaml new file mode 100644 index 00000000..8be930cc --- /dev/null +++ b/processor/elastictraceprocessor/testdata/elastic_txn_http/input.yaml @@ -0,0 +1,47 @@ +resourceSpans: + - resource: + attributes: + - key: resource.required + value: + stringValue: foo + - key: resource.optional + value: + stringValue: bar + scopeSpans: + - scope: {} + spans: + - attributes: + - key: http.request.method + value: + stringValue: POST + - key: url.full + value: + stringValue: https://www.foo.bar/search?q=OpenTelemetry#SemConv + - key: http.response.status_code + value: + intValue: 201 + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo1 + - key: event.attr2 + value: + stringValue: bar1 + name: event1 + timeUnixNano: "1581452773000000123" + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + - name: event-with-no-attrs + timeUnixNano: "1581452773000000123" + name: http-elastic-txn + parentSpanId: "" + startTimeUnixNano: "1581452772000000321" diff --git a/processor/elastictraceprocessor/testdata/elastic_txn_http/output.yaml b/processor/elastictraceprocessor/testdata/elastic_txn_http/output.yaml new file mode 100644 index 00000000..3892cbb0 --- /dev/null +++ b/processor/elastictraceprocessor/testdata/elastic_txn_http/output.yaml @@ -0,0 +1,59 @@ +resourceSpans: + - resource: + attributes: + - key: resource.required + value: + stringValue: foo + - key: resource.optional + value: + stringValue: bar + scopeSpans: + - scope: {} + spans: + - attributes: + - key: http.request.method + value: + stringValue: POST + - key: url.full + value: + stringValue: https://www.foo.bar/search?q=OpenTelemetry#SemConv + - key: http.response.status_code + value: + intValue: "201" + - key: transaction.type + value: + stringValue: request + - key: transaction.result + value: + stringValue: HTTP 2xx + - key: event.outcome + value: + stringValue: success + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo1 + - key: event.attr2 + value: + stringValue: bar1 + name: event1 + timeUnixNano: "1581452773000000123" + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + - name: event-with-no-attrs + timeUnixNano: "1581452773000000123" + name: http-elastic-txn + parentSpanId: "" + spanId: "" + startTimeUnixNano: "1581452772000000321" + status: {} + traceId: "" diff --git a/processor/elastictraceprocessor/testdata/elastic_txn_messaging/input.yaml b/processor/elastictraceprocessor/testdata/elastic_txn_messaging/input.yaml new file mode 100644 index 00000000..a0dfc2c3 --- /dev/null +++ b/processor/elastictraceprocessor/testdata/elastic_txn_messaging/input.yaml @@ -0,0 +1,44 @@ +resourceSpans: + - resource: + attributes: + - key: resource.test1 + value: + stringValue: foo + - key: resource.test2 + value: + stringValue: bar + scopeSpans: + - scope: {} + spans: + - attributes: + - key: messaging.system + value: + stringValue: kafka + - key: messaging.destination.name + value: + stringValue: TestTopic + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo1 + - key: event.attr2 + value: + stringValue: bar1 + name: event1 + timeUnixNano: "1581452773000000123" + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + - name: event-with-no-attrs + timeUnixNano: "1581452773000000123" + name: msg-elastic-txn + parentSpanId: "" + startTimeUnixNano: "1581452772000000321" diff --git a/processor/elastictraceprocessor/testdata/elastic_txn_messaging/output.yaml b/processor/elastictraceprocessor/testdata/elastic_txn_messaging/output.yaml new file mode 100644 index 00000000..d478bde5 --- /dev/null +++ b/processor/elastictraceprocessor/testdata/elastic_txn_messaging/output.yaml @@ -0,0 +1,56 @@ +resourceSpans: + - resource: + attributes: + - key: resource.test1 + value: + stringValue: foo + - key: resource.test2 + value: + stringValue: bar + scopeSpans: + - scope: {} + spans: + - attributes: + - key: messaging.system + value: + stringValue: kafka + - key: messaging.destination.name + value: + stringValue: TestTopic + - key: transaction.type + value: + stringValue: messaging + - key: transaction.result + value: + stringValue: Success + - key: event.outcome + value: + stringValue: success + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo1 + - key: event.attr2 + value: + stringValue: bar1 + name: event1 + timeUnixNano: "1581452773000000123" + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + - name: event-with-no-attrs + timeUnixNano: "1581452773000000123" + name: msg-elastic-txn + parentSpanId: "" + spanId: "" + startTimeUnixNano: "1581452772000000321" + status: {} + traceId: "" From 2f275db294097c72d44a31054293d6bdf9bf46d8 Mon Sep 17 00:00:00 2001 From: Vishal Raj Date: Mon, 15 Jul 2024 18:31:22 +0100 Subject: [PATCH 2/6] Add codeowners --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index bce97b40..b0b51964 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -2,4 +2,4 @@ * @elastic/otel-devs # Per-component owners -# TODO: define as needed \ No newline at end of file +processor/elastictraceprocessor @elastic/obs-ds-intake-services From 5cb31af68683166e314c8f4708e912ad7ee79c9c Mon Sep 17 00:00:00 2001 From: Vishal Raj Date: Thu, 18 Jul 2024 09:59:13 +0100 Subject: [PATCH 3/6] Use main for otel lib --- processor/elastictraceprocessor/go.mod | 8 ++++---- processor/elastictraceprocessor/go.sum | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/processor/elastictraceprocessor/go.mod b/processor/elastictraceprocessor/go.mod index 0b4dec52..2427066a 100644 --- a/processor/elastictraceprocessor/go.mod +++ b/processor/elastictraceprocessor/go.mod @@ -1,9 +1,11 @@ module github.com/elastic/opentelemetry-collector-components/processor/elastictraceprocessor -go 1.22.4 +go 1.21.1 + +toolchain go1.22.4 require ( - github.com/elastic/opentelemetry-lib v0.7.3 + github.com/elastic/opentelemetry-lib v0.7.4-0.20240718083557-8db2f04b826b github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.104.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.104.0 github.com/stretchr/testify v1.9.0 @@ -60,5 +62,3 @@ require ( google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/elastic/opentelemetry-lib => /Users/lahsivjar/Projects/elastic/opentelemetry-lib diff --git a/processor/elastictraceprocessor/go.sum b/processor/elastictraceprocessor/go.sum index 74b6b704..8e68d84c 100644 --- a/processor/elastictraceprocessor/go.sum +++ b/processor/elastictraceprocessor/go.sum @@ -6,6 +6,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/elastic/opentelemetry-lib v0.7.4-0.20240718083557-8db2f04b826b h1:0silr99FeAlvGbxXLnenVtQAGJSgPIu6Q9Zbwk8yhyI= +github.com/elastic/opentelemetry-lib v0.7.4-0.20240718083557-8db2f04b826b/go.mod h1:RwSX1tFT3nWYN2qW3hKXmuoSeChZt5tMhzaCXD/hOnw= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= From ba2f13e64dea49a8b78236a312b7c05631c4607f Mon Sep 17 00:00:00 2001 From: Vishal Raj Date: Thu, 18 Jul 2024 10:55:27 +0100 Subject: [PATCH 4/6] go mod update & tidy --- processor/elastictraceprocessor/go.mod | 27 +++++++++++++------------- processor/elastictraceprocessor/go.sum | 25 ++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/processor/elastictraceprocessor/go.mod b/processor/elastictraceprocessor/go.mod index 2427066a..b7918736 100644 --- a/processor/elastictraceprocessor/go.mod +++ b/processor/elastictraceprocessor/go.mod @@ -5,15 +5,15 @@ go 1.21.1 toolchain go1.22.4 require ( - github.com/elastic/opentelemetry-lib v0.7.4-0.20240718083557-8db2f04b826b + github.com/elastic/opentelemetry-lib v0.7.4-0.20240718095211-7190eff24069 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.104.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.104.0 github.com/stretchr/testify v1.9.0 - go.opentelemetry.io/collector/component v0.104.0 + go.opentelemetry.io/collector/component v0.105.0 go.opentelemetry.io/collector/confmap v0.104.0 - go.opentelemetry.io/collector/consumer v0.104.0 - go.opentelemetry.io/collector/pdata v1.11.0 - go.opentelemetry.io/collector/processor v0.104.0 + go.opentelemetry.io/collector/consumer v0.105.0 + go.opentelemetry.io/collector/pdata v1.12.0 + go.opentelemetry.io/collector/processor v0.105.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) @@ -40,24 +40,25 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.1 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.54.0 // indirect - github.com/prometheus/procfs v0.15.0 // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.104.0 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.105.0 // indirect go.opentelemetry.io/collector/featuregate v1.11.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.104.0 // indirect - go.opentelemetry.io/collector/pdata/testdata v0.104.0 // indirect - go.opentelemetry.io/collector/semconv v0.104.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.105.0 // indirect + go.opentelemetry.io/collector/pdata/testdata v0.105.0 // indirect + go.opentelemetry.io/collector/semconv v0.105.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.49.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.50.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect go.opentelemetry.io/otel/sdk v1.28.0 // indirect go.opentelemetry.io/otel/sdk/metric v1.28.0 // indirect go.opentelemetry.io/otel/trace v1.28.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/net v0.27.0 // indirect golang.org/x/sys v0.22.0 // indirect golang.org/x/text v0.16.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d // indirect google.golang.org/grpc v1.65.0 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/processor/elastictraceprocessor/go.sum b/processor/elastictraceprocessor/go.sum index 8e68d84c..12061944 100644 --- a/processor/elastictraceprocessor/go.sum +++ b/processor/elastictraceprocessor/go.sum @@ -8,6 +8,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/elastic/opentelemetry-lib v0.7.4-0.20240718083557-8db2f04b826b h1:0silr99FeAlvGbxXLnenVtQAGJSgPIu6Q9Zbwk8yhyI= github.com/elastic/opentelemetry-lib v0.7.4-0.20240718083557-8db2f04b826b/go.mod h1:RwSX1tFT3nWYN2qW3hKXmuoSeChZt5tMhzaCXD/hOnw= +github.com/elastic/opentelemetry-lib v0.7.4-0.20240718095211-7190eff24069 h1:QeCcC8rcKivBm64WNS32Q0/CQDzqwTk2U94sRHa7BCs= +github.com/elastic/opentelemetry-lib v0.7.4-0.20240718095211-7190eff24069/go.mod h1:7gR1tDziX3UOdCVgR/l2EqCBXPxhSdWbZX6ptKglaNU= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -62,8 +64,10 @@ github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -72,30 +76,47 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/collector v0.105.0 h1:Qw/ONVMPT3aD8HjdDRcXCGoZrtSWH3jx4BkwAN1yrEM= +go.opentelemetry.io/collector v0.105.0/go.mod h1:UVapTqB4fJeZpGU/YgOo6665cxCSytqYmMkVmRlu2cg= go.opentelemetry.io/collector/component v0.104.0 h1:jqu/X9rnv8ha0RNZ1a9+x7OU49KwSMsPbOuIEykHuQE= go.opentelemetry.io/collector/component v0.104.0/go.mod h1:1C7C0hMVSbXyY1ycCmaMUAR9fVwpgyiNQqxXtEWhVpw= +go.opentelemetry.io/collector/component v0.105.0 h1:/OdkWHd1xTNX7JRq9iW3AFoJAnYUOGZZyOprNQkGoTI= +go.opentelemetry.io/collector/component v0.105.0/go.mod h1:s8KoxOrhNIBzetkb0LHmzX1OI67DyZbaaUPOWIXS1mg= go.opentelemetry.io/collector/config/configtelemetry v0.104.0 h1:eHv98XIhapZA8MgTiipvi+FDOXoFhCYOwyKReOt+E4E= go.opentelemetry.io/collector/config/configtelemetry v0.104.0/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= +go.opentelemetry.io/collector/config/configtelemetry v0.105.0 h1:wEfUxAjjstp47aLr2s1cMZiH0dt+k42m6VC6HigqgJA= +go.opentelemetry.io/collector/config/configtelemetry v0.105.0/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= go.opentelemetry.io/collector/confmap v0.104.0 h1:d3yuwX+CHpoyCh0iMv3rqb/vwAekjSm4ZDL6UK1nZSA= go.opentelemetry.io/collector/confmap v0.104.0/go.mod h1:F8Lue+tPPn2oldXcfqI75PPMJoyzgUsKVtM/uHZLA4w= go.opentelemetry.io/collector/consumer v0.104.0 h1:Z1ZjapFp5mUcbkGEL96ljpqLIUMhRgQQpYKkDRtxy+4= go.opentelemetry.io/collector/consumer v0.104.0/go.mod h1:60zcIb0W9GW0z9uJCv6NmjpSbCfBOeRUyrtEwqK6Hzo= +go.opentelemetry.io/collector/consumer v0.105.0 h1:pO5Tspoz7yvEs81+904HfDjByP8Z7uuNk+7pOr3lRHM= +go.opentelemetry.io/collector/consumer v0.105.0/go.mod h1:tnaPDHUfKBJ01OnsJNRecniG9iciE+xHYLqamYwFQOQ= go.opentelemetry.io/collector/featuregate v1.11.0 h1:Z7puIymKoQRm3oNM/NH8reWc2zRPz2PNaJvuokh0lQY= go.opentelemetry.io/collector/featuregate v1.11.0/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U= go.opentelemetry.io/collector/pdata v1.11.0 h1:rzYyV1zfTQQz1DI9hCiaKyyaczqawN75XO9mdXmR/hE= go.opentelemetry.io/collector/pdata v1.11.0/go.mod h1:IHxHsp+Jq/xfjORQMDJjSH6jvedOSTOyu3nbxqhWSYE= +go.opentelemetry.io/collector/pdata v1.12.0 h1:Xx5VK1p4VO0md8MWm2icwC1MnJ7f8EimKItMWw46BmA= +go.opentelemetry.io/collector/pdata v1.12.0/go.mod h1:MYeB0MmMAxeM0hstCFrCqWLzdyeYySim2dG6pDT6nYI= go.opentelemetry.io/collector/pdata/pprofile v0.104.0 h1:MYOIHvPlKEJbWLiBKFQWGD0xd2u22xGVLt4jPbdxP4Y= go.opentelemetry.io/collector/pdata/pprofile v0.104.0/go.mod h1:7WpyHk2wJZRx70CGkBio8klrYTTXASbyIhf+rH4FKnA= +go.opentelemetry.io/collector/pdata/pprofile v0.105.0/go.mod h1:chr7lMJIzyXkccnPRkIPhyXtqLZLSReZYhwsggOGEfg= go.opentelemetry.io/collector/pdata/testdata v0.104.0 h1:BKTZ7hIyAX5DMPecrXkVB2e86HwWtJyOlXn/5vSVXNw= go.opentelemetry.io/collector/pdata/testdata v0.104.0/go.mod h1:3SnYKu8gLfxURJMWS/cFEUFs+jEKS6jvfqKXnOZsdkQ= +go.opentelemetry.io/collector/pdata/testdata v0.105.0/go.mod h1:NIfgaclQp/M1BZhgyc/7hDWD+/DumC/OMBQVI2KW+N0= go.opentelemetry.io/collector/processor v0.104.0 h1:KSvMDu4DWmK1/k2z2rOzMtTvAa00jnTabtPEK9WOSYI= go.opentelemetry.io/collector/processor v0.104.0/go.mod h1:qU2/xCCYdvVORkN6aq0H/WUWkvo505VGYg2eOwPvaTg= +go.opentelemetry.io/collector/processor v0.105.0 h1:LE6wEMWNa3h7eOJLMBm2lA0v6sc2j6Geqv1e3pIWS8Y= +go.opentelemetry.io/collector/processor v0.105.0/go.mod h1:QAvMEtd3k+YhRrnaEgs/8e0UueYonuT8Hg4udQOht60= go.opentelemetry.io/collector/semconv v0.104.0 h1:dUvajnh+AYJLEW/XOPk0T0BlwltSdi3vrjO7nSOos3k= go.opentelemetry.io/collector/semconv v0.104.0/go.mod h1:yMVUCNoQPZVq/IPfrHrnntZTWsLf5YGZ7qwKulIl5hw= +go.opentelemetry.io/collector/semconv v0.105.0 h1:8p6dZ3JfxFTjbY38d8xlQGB1TQ3nPUvs+D0RERniZ1g= +go.opentelemetry.io/collector/semconv v0.105.0/go.mod h1:yMVUCNoQPZVq/IPfrHrnntZTWsLf5YGZ7qwKulIl5hw= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/exporters/prometheus v0.50.0/go.mod h1:pMm5PkUo5YwbLiuEf7t2xg4wbP0/eSJrMxIMxKosynY= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= go.opentelemetry.io/otel/sdk v1.28.0 h1:b9d7hIry8yZsgtbmM0DKyPWMMUMlK9NEKuIG4aBqWyE= @@ -104,6 +125,8 @@ go.opentelemetry.io/otel/sdk/metric v1.28.0 h1:OkuaKgKrgAbYrrY0t92c+cC+2F6hsFNnC go.opentelemetry.io/otel/sdk/metric v1.28.0/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -143,6 +166,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d h1:JU0iKnSg02Gmb5ZdV8nYsKEKsP6o/FGVWTrw4i1DA9A= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= From 1fe7a2a6afad0b9cbba08b497eeea712e82195d3 Mon Sep 17 00:00:00 2001 From: Vishal Raj Date: Thu, 18 Jul 2024 10:59:09 +0100 Subject: [PATCH 5/6] go mod tidy --- processor/elastictraceprocessor/go.mod | 3 +-- processor/elastictraceprocessor/go.sum | 35 ++++++-------------------- 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/processor/elastictraceprocessor/go.mod b/processor/elastictraceprocessor/go.mod index b7918736..62267061 100644 --- a/processor/elastictraceprocessor/go.mod +++ b/processor/elastictraceprocessor/go.mod @@ -2,8 +2,6 @@ module github.com/elastic/opentelemetry-collector-components/processor/elastictr go 1.21.1 -toolchain go1.22.4 - require ( github.com/elastic/opentelemetry-lib v0.7.4-0.20240718095211-7190eff24069 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.104.0 @@ -36,6 +34,7 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.104.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.1 // indirect diff --git a/processor/elastictraceprocessor/go.sum b/processor/elastictraceprocessor/go.sum index 12061944..892e625b 100644 --- a/processor/elastictraceprocessor/go.sum +++ b/processor/elastictraceprocessor/go.sum @@ -6,8 +6,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/elastic/opentelemetry-lib v0.7.4-0.20240718083557-8db2f04b826b h1:0silr99FeAlvGbxXLnenVtQAGJSgPIu6Q9Zbwk8yhyI= -github.com/elastic/opentelemetry-lib v0.7.4-0.20240718083557-8db2f04b826b/go.mod h1:RwSX1tFT3nWYN2qW3hKXmuoSeChZt5tMhzaCXD/hOnw= github.com/elastic/opentelemetry-lib v0.7.4-0.20240718095211-7190eff24069 h1:QeCcC8rcKivBm64WNS32Q0/CQDzqwTk2U94sRHa7BCs= github.com/elastic/opentelemetry-lib v0.7.4-0.20240718095211-7190eff24069/go.mod h1:7gR1tDziX3UOdCVgR/l2EqCBXPxhSdWbZX6ptKglaNU= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -49,6 +47,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.104.0 h1:J4VwD+t7XpMuhdgd5KwhI5f17bOKHDD862szUW2ulVo= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.104.0/go.mod h1:MYspCVghl0glPIWT/gca6hXL48fROuJxo7lkEB171Ws= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.104.0 h1:bgS1X1UnUuYfKXsQPq3U50jsMNpN5lI+BcDeklPJOW8= @@ -62,11 +62,9 @@ github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQ github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= -github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= +github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= -github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= -github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= @@ -76,46 +74,29 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector v0.105.0 h1:Qw/ONVMPT3aD8HjdDRcXCGoZrtSWH3jx4BkwAN1yrEM= -go.opentelemetry.io/collector v0.105.0/go.mod h1:UVapTqB4fJeZpGU/YgOo6665cxCSytqYmMkVmRlu2cg= -go.opentelemetry.io/collector/component v0.104.0 h1:jqu/X9rnv8ha0RNZ1a9+x7OU49KwSMsPbOuIEykHuQE= -go.opentelemetry.io/collector/component v0.104.0/go.mod h1:1C7C0hMVSbXyY1ycCmaMUAR9fVwpgyiNQqxXtEWhVpw= go.opentelemetry.io/collector/component v0.105.0 h1:/OdkWHd1xTNX7JRq9iW3AFoJAnYUOGZZyOprNQkGoTI= go.opentelemetry.io/collector/component v0.105.0/go.mod h1:s8KoxOrhNIBzetkb0LHmzX1OI67DyZbaaUPOWIXS1mg= -go.opentelemetry.io/collector/config/configtelemetry v0.104.0 h1:eHv98XIhapZA8MgTiipvi+FDOXoFhCYOwyKReOt+E4E= -go.opentelemetry.io/collector/config/configtelemetry v0.104.0/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= go.opentelemetry.io/collector/config/configtelemetry v0.105.0 h1:wEfUxAjjstp47aLr2s1cMZiH0dt+k42m6VC6HigqgJA= go.opentelemetry.io/collector/config/configtelemetry v0.105.0/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= go.opentelemetry.io/collector/confmap v0.104.0 h1:d3yuwX+CHpoyCh0iMv3rqb/vwAekjSm4ZDL6UK1nZSA= go.opentelemetry.io/collector/confmap v0.104.0/go.mod h1:F8Lue+tPPn2oldXcfqI75PPMJoyzgUsKVtM/uHZLA4w= -go.opentelemetry.io/collector/consumer v0.104.0 h1:Z1ZjapFp5mUcbkGEL96ljpqLIUMhRgQQpYKkDRtxy+4= -go.opentelemetry.io/collector/consumer v0.104.0/go.mod h1:60zcIb0W9GW0z9uJCv6NmjpSbCfBOeRUyrtEwqK6Hzo= go.opentelemetry.io/collector/consumer v0.105.0 h1:pO5Tspoz7yvEs81+904HfDjByP8Z7uuNk+7pOr3lRHM= go.opentelemetry.io/collector/consumer v0.105.0/go.mod h1:tnaPDHUfKBJ01OnsJNRecniG9iciE+xHYLqamYwFQOQ= go.opentelemetry.io/collector/featuregate v1.11.0 h1:Z7puIymKoQRm3oNM/NH8reWc2zRPz2PNaJvuokh0lQY= go.opentelemetry.io/collector/featuregate v1.11.0/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U= -go.opentelemetry.io/collector/pdata v1.11.0 h1:rzYyV1zfTQQz1DI9hCiaKyyaczqawN75XO9mdXmR/hE= -go.opentelemetry.io/collector/pdata v1.11.0/go.mod h1:IHxHsp+Jq/xfjORQMDJjSH6jvedOSTOyu3nbxqhWSYE= go.opentelemetry.io/collector/pdata v1.12.0 h1:Xx5VK1p4VO0md8MWm2icwC1MnJ7f8EimKItMWw46BmA= go.opentelemetry.io/collector/pdata v1.12.0/go.mod h1:MYeB0MmMAxeM0hstCFrCqWLzdyeYySim2dG6pDT6nYI= -go.opentelemetry.io/collector/pdata/pprofile v0.104.0 h1:MYOIHvPlKEJbWLiBKFQWGD0xd2u22xGVLt4jPbdxP4Y= -go.opentelemetry.io/collector/pdata/pprofile v0.104.0/go.mod h1:7WpyHk2wJZRx70CGkBio8klrYTTXASbyIhf+rH4FKnA= +go.opentelemetry.io/collector/pdata/pprofile v0.105.0 h1:C+Hd7CNcepL/364OBV9f4lHzJil2jQSOxcEM1PFXGDg= go.opentelemetry.io/collector/pdata/pprofile v0.105.0/go.mod h1:chr7lMJIzyXkccnPRkIPhyXtqLZLSReZYhwsggOGEfg= -go.opentelemetry.io/collector/pdata/testdata v0.104.0 h1:BKTZ7hIyAX5DMPecrXkVB2e86HwWtJyOlXn/5vSVXNw= -go.opentelemetry.io/collector/pdata/testdata v0.104.0/go.mod h1:3SnYKu8gLfxURJMWS/cFEUFs+jEKS6jvfqKXnOZsdkQ= +go.opentelemetry.io/collector/pdata/testdata v0.105.0 h1:5sPZzanR4nJR3sNQk3MTdArdEZCK0NRAfC29t0Dtf60= go.opentelemetry.io/collector/pdata/testdata v0.105.0/go.mod h1:NIfgaclQp/M1BZhgyc/7hDWD+/DumC/OMBQVI2KW+N0= -go.opentelemetry.io/collector/processor v0.104.0 h1:KSvMDu4DWmK1/k2z2rOzMtTvAa00jnTabtPEK9WOSYI= -go.opentelemetry.io/collector/processor v0.104.0/go.mod h1:qU2/xCCYdvVORkN6aq0H/WUWkvo505VGYg2eOwPvaTg= go.opentelemetry.io/collector/processor v0.105.0 h1:LE6wEMWNa3h7eOJLMBm2lA0v6sc2j6Geqv1e3pIWS8Y= go.opentelemetry.io/collector/processor v0.105.0/go.mod h1:QAvMEtd3k+YhRrnaEgs/8e0UueYonuT8Hg4udQOht60= -go.opentelemetry.io/collector/semconv v0.104.0 h1:dUvajnh+AYJLEW/XOPk0T0BlwltSdi3vrjO7nSOos3k= -go.opentelemetry.io/collector/semconv v0.104.0/go.mod h1:yMVUCNoQPZVq/IPfrHrnntZTWsLf5YGZ7qwKulIl5hw= go.opentelemetry.io/collector/semconv v0.105.0 h1:8p6dZ3JfxFTjbY38d8xlQGB1TQ3nPUvs+D0RERniZ1g= go.opentelemetry.io/collector/semconv v0.105.0/go.mod h1:yMVUCNoQPZVq/IPfrHrnntZTWsLf5YGZ7qwKulIl5hw= go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= -go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= -go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= +go.opentelemetry.io/otel/exporters/prometheus v0.50.0 h1:2Ewsda6hejmbhGFyUvWZjUThC98Cf8Zy6g0zkIimOng= go.opentelemetry.io/otel/exporters/prometheus v0.50.0/go.mod h1:pMm5PkUo5YwbLiuEf7t2xg4wbP0/eSJrMxIMxKosynY= go.opentelemetry.io/otel/metric v1.28.0 h1:f0HGvSl1KRAU1DLgLGFjrwVyismPlnuU6JD6bOeuA5Q= go.opentelemetry.io/otel/metric v1.28.0/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= @@ -164,8 +145,6 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d h1:JU0iKnSg02Gmb5ZdV8nYsKEKsP6o/FGVWTrw4i1DA9A= google.golang.org/genproto/googleapis/rpc v0.0.0-20240711142825-46eb208f015d/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= From ed24e7d71fc5ce4ec7e68d52aeea0cd8039a3f9b Mon Sep 17 00:00:00 2001 From: Vishal Raj Date: Thu, 18 Jul 2024 19:28:39 +0100 Subject: [PATCH 6/6] simplify iface --- processor/elastictraceprocessor/processor.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/processor/elastictraceprocessor/processor.go b/processor/elastictraceprocessor/processor.go index 3a4d5fb2..bca8a35a 100644 --- a/processor/elastictraceprocessor/processor.go +++ b/processor/elastictraceprocessor/processor.go @@ -31,6 +31,9 @@ import ( var _ processor.Traces = (*Processor)(nil) type Processor struct { + component.StartFunc + component.ShutdownFunc + next consumer.Traces logger *zap.Logger } @@ -42,14 +45,6 @@ func newProcessor(logger *zap.Logger, next consumer.Traces) *Processor { } } -func (p *Processor) Start(context.Context, component.Host) error { - return nil -} - -func (p *Processor) Shutdown(context.Context) error { - return nil -} - func (p *Processor) Capabilities() consumer.Capabilities { return consumer.Capabilities{MutatesData: true} }