From 3ed5dcd633c0a2ef43746d5c29438f7b6562ec84 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Tue, 5 Nov 2024 14:08:21 +0100 Subject: [PATCH 01/19] [resourceprocessor] add support for profile signal type Signed-off-by: Florian Bacher --- .../resource-processor-add-profiles.yaml | 27 ++++++++++++++ processor/resourceprocessor/factory.go | 37 +++++++++++++++---- processor/resourceprocessor/factory_test.go | 15 ++++++++ processor/resourceprocessor/go.mod | 7 ++-- processor/resourceprocessor/go.sum | 14 ++++--- processor/resourceprocessor/metadata.yaml | 1 + .../resourceprocessor/resource_processor.go | 9 +++++ .../resource_processor_test.go | 37 +++++++++++++++++++ 8 files changed, 131 insertions(+), 16 deletions(-) create mode 100644 .chloggen/resource-processor-add-profiles.yaml diff --git a/.chloggen/resource-processor-add-profiles.yaml b/.chloggen/resource-processor-add-profiles.yaml new file mode 100644 index 000000000000..02fecc36f855 --- /dev/null +++ b/.chloggen/resource-processor-add-profiles.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: resourceprocessor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add support for profile signal type + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [359979] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/processor/resourceprocessor/factory.go b/processor/resourceprocessor/factory.go index 814596b8fb00..6843226fbbe6 100644 --- a/processor/resourceprocessor/factory.go +++ b/processor/resourceprocessor/factory.go @@ -6,25 +6,29 @@ package resourceprocessor // import "github.com/open-telemetry/opentelemetry-col import ( "context" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor/internal/metadata" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumerprofiles" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processorhelper" - - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor/internal/metadata" + "go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles" + "go.opentelemetry.io/collector/processor/processorprofiles" ) var processorCapabilities = consumer.Capabilities{MutatesData: true} // NewFactory returns a new factory for the Resource processor. func NewFactory() processor.Factory { - return processor.NewFactory( + return processorprofiles.NewFactory( metadata.Type, createDefaultConfig, - processor.WithTraces(createTracesProcessor, metadata.TracesStability), - processor.WithMetrics(createMetricsProcessor, metadata.MetricsStability), - processor.WithLogs(createLogsProcessor, metadata.LogsStability)) + processorprofiles.WithTraces(createTracesProcessor, metadata.TracesStability), + processorprofiles.WithMetrics(createMetricsProcessor, metadata.MetricsStability), + processorprofiles.WithLogs(createLogsProcessor, metadata.LogsStability), + processorprofiles.WithProfiles(createProfilesProcessor, metadata.LogsStability), + ) } // Note: This isn't a valid configuration because the processor would do no work. @@ -88,3 +92,22 @@ func createLogsProcessor( proc.processLogs, processorhelper.WithCapabilities(processorCapabilities)) } + +func createProfilesProcessor( + ctx context.Context, + set processor.Settings, + cfg component.Config, + nextConsumer consumerprofiles.Profiles) (processorprofiles.Profiles, error) { + attrProc, err := attraction.NewAttrProc(&attraction.Settings{Actions: cfg.(*Config).AttributesActions}) + if err != nil { + return nil, err + } + proc := resourceProcessor{logger: set.Logger, attrProc: attrProc} + return processorhelperprofiles.NewProfiles( + ctx, + set, + cfg, + nextConsumer, + proc.processProfiles, + processorhelperprofiles.WithCapabilities(processorCapabilities)) +} diff --git a/processor/resourceprocessor/factory_test.go b/processor/resourceprocessor/factory_test.go index 8f09bb173e2a..dc2cba9aba34 100644 --- a/processor/resourceprocessor/factory_test.go +++ b/processor/resourceprocessor/factory_test.go @@ -10,6 +10,7 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/processor/processorprofiles" "go.opentelemetry.io/collector/processor/processortest" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction" @@ -37,6 +38,14 @@ func TestCreateProcessor(t *testing.T) { mp, err := factory.CreateMetrics(context.Background(), processortest.NewNopSettings(), cfg, consumertest.NewNop()) assert.NoError(t, err) assert.NotNil(t, mp) + + lp, err := factory.CreateLogs(context.Background(), processortest.NewNopSettings(), cfg, consumertest.NewNop()) + assert.NoError(t, err) + assert.NotNil(t, lp) + + pp, err := factory.(processorprofiles.Factory).CreateProfiles(context.Background(), processortest.NewNopSettings(), cfg, consumertest.NewNop()) + assert.NoError(t, err) + assert.NotNil(t, pp) } func TestInvalidAttributeActions(t *testing.T) { @@ -52,4 +61,10 @@ func TestInvalidAttributeActions(t *testing.T) { _, err = factory.CreateMetrics(context.Background(), processortest.NewNopSettings(), cfg, nil) assert.Error(t, err) + + _, err = factory.CreateLogs(context.Background(), processortest.NewNopSettings(), cfg, nil) + assert.Error(t, err) + + _, err = factory.(processorprofiles.Factory).CreateProfiles(context.Background(), processortest.NewNopSettings(), cfg, nil) + assert.Error(t, err) } diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index d7432e645d26..2c560e1ff912 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -9,9 +9,13 @@ require ( go.opentelemetry.io/collector/component v0.112.0 go.opentelemetry.io/collector/confmap v1.18.0 go.opentelemetry.io/collector/consumer v0.112.0 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.112.1-0.20241029112935-002a74860455 go.opentelemetry.io/collector/consumer/consumertest v0.112.0 go.opentelemetry.io/collector/pdata v1.18.0 + go.opentelemetry.io/collector/pdata/pprofile v0.112.1-0.20241029112935-002a74860455 go.opentelemetry.io/collector/processor v0.112.0 + go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.0.0-20241029112935-002a74860455 + go.opentelemetry.io/collector/processor/processorprofiles v0.112.1-0.20241029112935-002a74860455 go.opentelemetry.io/collector/processor/processortest v0.112.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 @@ -39,11 +43,8 @@ require ( go.opentelemetry.io/collector/client v1.18.0 // indirect go.opentelemetry.io/collector/component/componentstatus v0.112.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.112.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.112.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.112.0 // indirect go.opentelemetry.io/collector/pdata/testdata v0.112.0 // indirect go.opentelemetry.io/collector/pipeline v0.112.0 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.112.0 // indirect go.opentelemetry.io/otel v1.31.0 // indirect go.opentelemetry.io/otel/metric v1.31.0 // indirect go.opentelemetry.io/otel/sdk v1.31.0 // indirect diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index 34ccb3b8d01e..15e8fd4a7166 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -62,22 +62,24 @@ go.opentelemetry.io/collector/confmap v1.18.0 h1:UEOeJY8RW8lZ1O4lzHSGqolS7uzkpXQ go.opentelemetry.io/collector/confmap v1.18.0/go.mod h1:GgNu1ElPGmLn9govqIfjaopvdspw4PJ9KeDtWC4E2Q4= go.opentelemetry.io/collector/consumer v0.112.0 h1:tfO4FpuQ8MsD7AxgslC3tRNVYjd9Xkus34BOExsG4fM= go.opentelemetry.io/collector/consumer v0.112.0/go.mod h1:ZKSeGvXvaofIlvPrWlARKQpONOmuw6R/yifgYCWHKRw= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.112.0 h1:ym+QxemlbWwfMSUto1hRTfcZeYbj2q8FpMzjk8O+X60= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.112.0/go.mod h1:4PjDUpURFh85R6NLEHrEf/uZjpk4LAYmmOrqu+iZsyE= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.112.1-0.20241029112935-002a74860455 h1:Z0w0Yv0CF4rou2RvVlzpwzk2UVyXp/blaD/vwuFgVvk= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.112.1-0.20241029112935-002a74860455/go.mod h1:4PjDUpURFh85R6NLEHrEf/uZjpk4LAYmmOrqu+iZsyE= go.opentelemetry.io/collector/consumer/consumertest v0.112.0 h1:pGvNH+H4rMygUOql6ynVQim6UFdimTiJ0HRfQL6v0GE= go.opentelemetry.io/collector/consumer/consumertest v0.112.0/go.mod h1:rfVo0tYt/BaLWw3IaQKVQafjUlMsA5qTkvsSOfFrr9c= go.opentelemetry.io/collector/pdata v1.18.0 h1:/yg2rO2dxqDM2p6GutsMCxXN6sKlXwyIz/ZYyUPONBg= go.opentelemetry.io/collector/pdata v1.18.0/go.mod h1:Ox1YVLe87cZDB/TL30i4SUz1cA5s6AM6SpFMfY61ICs= -go.opentelemetry.io/collector/pdata/pprofile v0.112.0 h1:t+LYorcMqZ3sDz5/jp3xU2l5lIhIXuIOOGO4Ef9CG2c= -go.opentelemetry.io/collector/pdata/pprofile v0.112.0/go.mod h1:F2aTCoDzIaxEUK1g92LZvMwradySFMo3ZsAnBIpOdUg= +go.opentelemetry.io/collector/pdata/pprofile v0.112.1-0.20241029112935-002a74860455 h1:0DkJvKudkiP45F0mmVHK6Ud2KFtJ9kF6PYkiIeUK7V0= +go.opentelemetry.io/collector/pdata/pprofile v0.112.1-0.20241029112935-002a74860455/go.mod h1:F2aTCoDzIaxEUK1g92LZvMwradySFMo3ZsAnBIpOdUg= go.opentelemetry.io/collector/pdata/testdata v0.112.0 h1:7jJzNvRE+CpYrwHbAYwPiN9a/hqmVRlRADJNeDJTvYI= go.opentelemetry.io/collector/pdata/testdata v0.112.0/go.mod h1:9kO148Qp12B93SSUE52s0QGGV8Nf9RFN2G/PnZx3l+w= go.opentelemetry.io/collector/pipeline v0.112.0 h1:jqKDdb8k53OLPibvxzX6fmMec0ZHAtqe4p2+cuHclEI= go.opentelemetry.io/collector/pipeline v0.112.0/go.mod h1:4vOvjVsoYTHVGTbfFwqfnQOSV2K3RKUHofh3jNRc2Mg= go.opentelemetry.io/collector/processor v0.112.0 h1:nMv9DOBYR9MB78ddUgY3A3ytwAwk3t4HQMNIu+w8o0g= go.opentelemetry.io/collector/processor v0.112.0/go.mod h1:AJ8EHq8Z/ev90f4gU6G5ULUncdpWmBRATYk8ioR3pvw= -go.opentelemetry.io/collector/processor/processorprofiles v0.112.0 h1:Aef68SAbmBbhbsZZPuZb0ECwkV05vIcHIizGOGbWsbM= -go.opentelemetry.io/collector/processor/processorprofiles v0.112.0/go.mod h1:OUS7GcPCvFAIERSUFJLMtj6MSUOTCuS2pGKB7B+OHXs= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.0.0-20241029112935-002a74860455 h1:va4D0kykoFBAozz/gn/rxuqqGnVX8Fo0p/WiXuKn7W8= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.0.0-20241029112935-002a74860455/go.mod h1:L9jBHdFye2OepokuUfvWytp+xg1RAlaPP7aURJ+n4vM= +go.opentelemetry.io/collector/processor/processorprofiles v0.112.1-0.20241029112935-002a74860455 h1:sawWSOwg9/Ks/ObELNoQZCh26JvLBMs7YZBi8sRISVg= +go.opentelemetry.io/collector/processor/processorprofiles v0.112.1-0.20241029112935-002a74860455/go.mod h1:OUS7GcPCvFAIERSUFJLMtj6MSUOTCuS2pGKB7B+OHXs= go.opentelemetry.io/collector/processor/processortest v0.112.0 h1:kW7kZ6EC1YjBiOvdajxN/DxvVljr9MKMemHheoaYcFc= go.opentelemetry.io/collector/processor/processortest v0.112.0/go.mod h1:idZ8tCMswGQ8VsPBLtPDL2N7+pvtiMYkz6vNFPPew2M= go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= diff --git a/processor/resourceprocessor/metadata.yaml b/processor/resourceprocessor/metadata.yaml index 51277506c27f..c3240e99d5b8 100644 --- a/processor/resourceprocessor/metadata.yaml +++ b/processor/resourceprocessor/metadata.yaml @@ -3,6 +3,7 @@ type: resource status: class: processor stability: + development: [profiles] beta: [traces, metrics, logs] distributions: [core, contrib, k8s] codeowners: diff --git a/processor/resourceprocessor/resource_processor.go b/processor/resourceprocessor/resource_processor.go index a7588418415f..3fed3c6a5f2c 100644 --- a/processor/resourceprocessor/resource_processor.go +++ b/processor/resourceprocessor/resource_processor.go @@ -8,6 +8,7 @@ import ( "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pprofile" "go.opentelemetry.io/collector/pdata/ptrace" "go.uber.org/zap" @@ -42,3 +43,11 @@ func (rp *resourceProcessor) processLogs(ctx context.Context, ld plog.Logs) (plo } return ld, nil } + +func (rp *resourceProcessor) processProfiles(ctx context.Context, pd pprofile.Profiles) (pprofile.Profiles, error) { + rps := pd.ResourceProfiles() + for i := 0; i < rps.Len(); i++ { + rp.attrProc.Process(ctx, rp.logger, rps.At(i).Resource().Attributes()) + } + return pd, nil +} diff --git a/processor/resourceprocessor/resource_processor_test.go b/processor/resourceprocessor/resource_processor_test.go index 83c705f09a91..dfc82ce810c4 100644 --- a/processor/resourceprocessor/resource_processor_test.go +++ b/processor/resourceprocessor/resource_processor_test.go @@ -12,7 +12,9 @@ import ( "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/pprofile" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/processor/processorprofiles" "go.opentelemetry.io/collector/processor/processortest" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction" @@ -131,6 +133,20 @@ func TestResourceProcessorAttributesUpsert(t *testing.T) { logs := tln.AllLogs() require.Len(t, logs, 1) assert.NoError(t, plogtest.CompareLogs(wantLogData, logs[0])) + + // Test profiles consumer + tpn := new(consumertest.ProfilesSink) + rpp, err := factory.(processorprofiles.Factory).CreateProfiles(context.Background(), processortest.NewNopSettings(), tt.config, tpn) + require.NoError(t, err) + assert.True(t, rpp.Capabilities().MutatesData) + + sourceProfileData := generateProfileData(tt.sourceAttributes) + wantProfileData := generateProfileData(tt.wantAttributes) + err = rpp.ConsumeProfiles(context.Background(), sourceProfileData) + require.NoError(t, err) + profiles := tpn.AllProfiles() + require.Len(t, profiles, 1) + compareProfileAttributes(t, wantProfileData, sourceProfileData) }) } } @@ -170,3 +186,24 @@ func generateLogData(attributes map[string]string) plog.Logs { } return ld } + +func generateProfileData(attributes map[string]string) pprofile.Profiles { + p := pprofile.NewProfiles() + rp := p.ResourceProfiles().AppendEmpty() + + for k, v := range attributes { + rp.Resource().Attributes().PutStr(k, v) + } + return p +} + +func compareProfileAttributes(t *testing.T, expected pprofile.Profiles, got pprofile.Profiles) { + require.Equal(t, expected.ResourceProfiles().Len(), got.ResourceProfiles().Len()) + + for i := 0; i < expected.ResourceProfiles().Len(); i++ { + expectedResourceProfile := expected.ResourceProfiles().At(i) + gotResourceProfile := got.ResourceProfiles().At(i) + + require.Equal(t, expectedResourceProfile.Resource().Attributes(), gotResourceProfile.Resource().Attributes()) + } +} From b8a5079619f895896a31b7dd1240a39c4612263a Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Tue, 5 Nov 2024 14:58:46 +0100 Subject: [PATCH 02/19] update go deps Signed-off-by: Florian Bacher --- processor/resourceprocessor/go.mod | 6 +++--- processor/resourceprocessor/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index 2c560e1ff912..5b3ede857415 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -9,13 +9,13 @@ require ( go.opentelemetry.io/collector/component v0.112.0 go.opentelemetry.io/collector/confmap v1.18.0 go.opentelemetry.io/collector/consumer v0.112.0 - go.opentelemetry.io/collector/consumer/consumerprofiles v0.112.1-0.20241029112935-002a74860455 + go.opentelemetry.io/collector/consumer/consumerprofiles v0.112.0 go.opentelemetry.io/collector/consumer/consumertest v0.112.0 go.opentelemetry.io/collector/pdata v1.18.0 - go.opentelemetry.io/collector/pdata/pprofile v0.112.1-0.20241029112935-002a74860455 + go.opentelemetry.io/collector/pdata/pprofile v0.112.0 go.opentelemetry.io/collector/processor v0.112.0 go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.0.0-20241029112935-002a74860455 - go.opentelemetry.io/collector/processor/processorprofiles v0.112.1-0.20241029112935-002a74860455 + go.opentelemetry.io/collector/processor/processorprofiles v0.112.0 go.opentelemetry.io/collector/processor/processortest v0.112.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index 15e8fd4a7166..52ed37df7f97 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -62,14 +62,14 @@ go.opentelemetry.io/collector/confmap v1.18.0 h1:UEOeJY8RW8lZ1O4lzHSGqolS7uzkpXQ go.opentelemetry.io/collector/confmap v1.18.0/go.mod h1:GgNu1ElPGmLn9govqIfjaopvdspw4PJ9KeDtWC4E2Q4= go.opentelemetry.io/collector/consumer v0.112.0 h1:tfO4FpuQ8MsD7AxgslC3tRNVYjd9Xkus34BOExsG4fM= go.opentelemetry.io/collector/consumer v0.112.0/go.mod h1:ZKSeGvXvaofIlvPrWlARKQpONOmuw6R/yifgYCWHKRw= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.112.1-0.20241029112935-002a74860455 h1:Z0w0Yv0CF4rou2RvVlzpwzk2UVyXp/blaD/vwuFgVvk= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.112.1-0.20241029112935-002a74860455/go.mod h1:4PjDUpURFh85R6NLEHrEf/uZjpk4LAYmmOrqu+iZsyE= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.112.0 h1:ym+QxemlbWwfMSUto1hRTfcZeYbj2q8FpMzjk8O+X60= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.112.0/go.mod h1:4PjDUpURFh85R6NLEHrEf/uZjpk4LAYmmOrqu+iZsyE= go.opentelemetry.io/collector/consumer/consumertest v0.112.0 h1:pGvNH+H4rMygUOql6ynVQim6UFdimTiJ0HRfQL6v0GE= go.opentelemetry.io/collector/consumer/consumertest v0.112.0/go.mod h1:rfVo0tYt/BaLWw3IaQKVQafjUlMsA5qTkvsSOfFrr9c= go.opentelemetry.io/collector/pdata v1.18.0 h1:/yg2rO2dxqDM2p6GutsMCxXN6sKlXwyIz/ZYyUPONBg= go.opentelemetry.io/collector/pdata v1.18.0/go.mod h1:Ox1YVLe87cZDB/TL30i4SUz1cA5s6AM6SpFMfY61ICs= -go.opentelemetry.io/collector/pdata/pprofile v0.112.1-0.20241029112935-002a74860455 h1:0DkJvKudkiP45F0mmVHK6Ud2KFtJ9kF6PYkiIeUK7V0= -go.opentelemetry.io/collector/pdata/pprofile v0.112.1-0.20241029112935-002a74860455/go.mod h1:F2aTCoDzIaxEUK1g92LZvMwradySFMo3ZsAnBIpOdUg= +go.opentelemetry.io/collector/pdata/pprofile v0.112.0 h1:t+LYorcMqZ3sDz5/jp3xU2l5lIhIXuIOOGO4Ef9CG2c= +go.opentelemetry.io/collector/pdata/pprofile v0.112.0/go.mod h1:F2aTCoDzIaxEUK1g92LZvMwradySFMo3ZsAnBIpOdUg= go.opentelemetry.io/collector/pdata/testdata v0.112.0 h1:7jJzNvRE+CpYrwHbAYwPiN9a/hqmVRlRADJNeDJTvYI= go.opentelemetry.io/collector/pdata/testdata v0.112.0/go.mod h1:9kO148Qp12B93SSUE52s0QGGV8Nf9RFN2G/PnZx3l+w= go.opentelemetry.io/collector/pipeline v0.112.0 h1:jqKDdb8k53OLPibvxzX6fmMec0ZHAtqe4p2+cuHclEI= @@ -78,8 +78,8 @@ go.opentelemetry.io/collector/processor v0.112.0 h1:nMv9DOBYR9MB78ddUgY3A3ytwAwk go.opentelemetry.io/collector/processor v0.112.0/go.mod h1:AJ8EHq8Z/ev90f4gU6G5ULUncdpWmBRATYk8ioR3pvw= go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.0.0-20241029112935-002a74860455 h1:va4D0kykoFBAozz/gn/rxuqqGnVX8Fo0p/WiXuKn7W8= go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.0.0-20241029112935-002a74860455/go.mod h1:L9jBHdFye2OepokuUfvWytp+xg1RAlaPP7aURJ+n4vM= -go.opentelemetry.io/collector/processor/processorprofiles v0.112.1-0.20241029112935-002a74860455 h1:sawWSOwg9/Ks/ObELNoQZCh26JvLBMs7YZBi8sRISVg= -go.opentelemetry.io/collector/processor/processorprofiles v0.112.1-0.20241029112935-002a74860455/go.mod h1:OUS7GcPCvFAIERSUFJLMtj6MSUOTCuS2pGKB7B+OHXs= +go.opentelemetry.io/collector/processor/processorprofiles v0.112.0 h1:Aef68SAbmBbhbsZZPuZb0ECwkV05vIcHIizGOGbWsbM= +go.opentelemetry.io/collector/processor/processorprofiles v0.112.0/go.mod h1:OUS7GcPCvFAIERSUFJLMtj6MSUOTCuS2pGKB7B+OHXs= go.opentelemetry.io/collector/processor/processortest v0.112.0 h1:kW7kZ6EC1YjBiOvdajxN/DxvVljr9MKMemHheoaYcFc= go.opentelemetry.io/collector/processor/processortest v0.112.0/go.mod h1:idZ8tCMswGQ8VsPBLtPDL2N7+pvtiMYkz6vNFPPew2M= go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= From 97cb116032584ee32ed2fe9c743ee8605bfc81ae Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Tue, 5 Nov 2024 15:20:12 +0100 Subject: [PATCH 03/19] fix linting and other checks Signed-off-by: Florian Bacher --- processor/resourceprocessor/README.md | 4 +++- processor/resourceprocessor/factory.go | 5 +++-- .../internal/metadata/generated_status.go | 7 ++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/processor/resourceprocessor/README.md b/processor/resourceprocessor/README.md index 6d5744de673b..ba567676a967 100644 --- a/processor/resourceprocessor/README.md +++ b/processor/resourceprocessor/README.md @@ -3,11 +3,13 @@ | Status | | | ------------- |-----------| -| Stability | [beta]: traces, metrics, logs | +| Stability | [development]: profiles | +| | [beta]: traces, metrics, logs | | Distributions | [core], [contrib], [k8s] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Fresource%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Fresource) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Fresource%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Fresource) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dmitryax](https://www.github.com/dmitryax) | +[development]: https://github.com/open-telemetry/opentelemetry-collector#development [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/processor/resourceprocessor/factory.go b/processor/resourceprocessor/factory.go index 6843226fbbe6..1be59abb21fe 100644 --- a/processor/resourceprocessor/factory.go +++ b/processor/resourceprocessor/factory.go @@ -6,8 +6,6 @@ package resourceprocessor // import "github.com/open-telemetry/opentelemetry-col import ( "context" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor/internal/metadata" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumerprofiles" @@ -15,6 +13,9 @@ import ( "go.opentelemetry.io/collector/processor/processorhelper" "go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles" "go.opentelemetry.io/collector/processor/processorprofiles" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor/internal/metadata" ) var processorCapabilities = consumer.Capabilities{MutatesData: true} diff --git a/processor/resourceprocessor/internal/metadata/generated_status.go b/processor/resourceprocessor/internal/metadata/generated_status.go index 9b6327066964..e609844c2a1d 100644 --- a/processor/resourceprocessor/internal/metadata/generated_status.go +++ b/processor/resourceprocessor/internal/metadata/generated_status.go @@ -12,7 +12,8 @@ var ( ) const ( - TracesStability = component.StabilityLevelBeta - MetricsStability = component.StabilityLevelBeta - LogsStability = component.StabilityLevelBeta + ProfilesStability = component.StabilityLevelDevelopment + TracesStability = component.StabilityLevelBeta + MetricsStability = component.StabilityLevelBeta + LogsStability = component.StabilityLevelBeta ) From fc6be7ad69795d8009ba8543b02cda0bf3947e77 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Wed, 6 Nov 2024 08:28:01 +0100 Subject: [PATCH 04/19] fix failing unit test Signed-off-by: Florian Bacher --- processor/resourceprocessor/resource_processor_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/processor/resourceprocessor/resource_processor_test.go b/processor/resourceprocessor/resource_processor_test.go index dfc82ce810c4..0573f6acb220 100644 --- a/processor/resourceprocessor/resource_processor_test.go +++ b/processor/resourceprocessor/resource_processor_test.go @@ -5,6 +5,7 @@ package resourceprocessor import ( "context" + "go.opentelemetry.io/collector/pdata/pcommon" "testing" "github.com/stretchr/testify/assert" @@ -204,6 +205,11 @@ func compareProfileAttributes(t *testing.T, expected pprofile.Profiles, got ppro expectedResourceProfile := expected.ResourceProfiles().At(i) gotResourceProfile := got.ResourceProfiles().At(i) - require.Equal(t, expectedResourceProfile.Resource().Attributes(), gotResourceProfile.Resource().Attributes()) + expectedResourceProfile.Resource().Attributes().Range(func(k string, v pcommon.Value) bool { + get, ok := gotResourceProfile.Resource().Attributes().Get(k) + require.True(t, ok) + require.Equal(t, v, get) + return true + }) } } From 0504632f3eb9462720631a7b029fad4414aedf94 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Wed, 6 Nov 2024 08:34:52 +0100 Subject: [PATCH 05/19] fix linting Signed-off-by: Florian Bacher --- processor/resourceprocessor/resource_processor_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processor/resourceprocessor/resource_processor_test.go b/processor/resourceprocessor/resource_processor_test.go index 0573f6acb220..a1a5e8f772cb 100644 --- a/processor/resourceprocessor/resource_processor_test.go +++ b/processor/resourceprocessor/resource_processor_test.go @@ -5,12 +5,12 @@ package resourceprocessor import ( "context" - "go.opentelemetry.io/collector/pdata/pcommon" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "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/pprofile" From ec30145bf2eef7f23c652dd274dffa32454ce80b Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Thu, 7 Nov 2024 09:49:25 +0100 Subject: [PATCH 06/19] go mod tidy Signed-off-by: Florian Bacher --- processor/resourceprocessor/go.mod | 3 --- processor/resourceprocessor/go.sum | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index a41df09568df..de090043b014 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -43,11 +43,8 @@ require ( go.opentelemetry.io/collector/client v1.19.0 // indirect go.opentelemetry.io/collector/component/componentstatus v0.113.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.113.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.113.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.113.0 // indirect go.opentelemetry.io/collector/pdata/testdata v0.113.0 // indirect go.opentelemetry.io/collector/pipeline v0.113.0 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.113.0 // indirect go.opentelemetry.io/otel v1.31.0 // indirect go.opentelemetry.io/otel/metric v1.31.0 // indirect go.opentelemetry.io/otel/sdk v1.31.0 // indirect diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index 1effbe28983a..a7becaeed85e 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -76,6 +76,8 @@ go.opentelemetry.io/collector/pipeline v0.113.0 h1:vSRzRe3717jV0btCNPhVkhg2lu0uF go.opentelemetry.io/collector/pipeline v0.113.0/go.mod h1:4vOvjVsoYTHVGTbfFwqfnQOSV2K3RKUHofh3jNRc2Mg= go.opentelemetry.io/collector/processor v0.113.0 h1:BQI6MsKtiCG9HT/nmiRXTKP6SZFrjFKVfM6pTQfbc0k= go.opentelemetry.io/collector/processor v0.113.0/go.mod h1:oX91zMI8ZkoaYSUfUYflHiMiiBJPKtODNBUCrETLLd8= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.113.0 h1:bZ1i5l6/4nj7PsLqeHw7Opw5vdrpUsDvuH6a6kx+2yg= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.113.0/go.mod h1:Uxv+5NNIJJCuz52DPFa9INjrpZSfidoTkv849tNp1qI= go.opentelemetry.io/collector/processor/processorprofiles v0.113.0 h1:cczN6whdrCWww3T0FBV3U7lsVKQmkWDX05M+9lANHgk= go.opentelemetry.io/collector/processor/processorprofiles v0.113.0/go.mod h1:4Dmx5qsvujgJ+MC+KqWI7UDVM2liXa3sH/9XnGiL9aE= go.opentelemetry.io/collector/processor/processortest v0.113.0 h1:jGoDJ+tDCzuDcAWZeshQtnK/DQAvMKd4wZAIDgAM5aA= From b15f297785e4e7060aac8271b59e49563ecd5210 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Mon, 11 Nov 2024 07:06:07 +0100 Subject: [PATCH 07/19] fix profiles stability level Signed-off-by: Florian Bacher --- processor/resourceprocessor/factory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processor/resourceprocessor/factory.go b/processor/resourceprocessor/factory.go index 1be59abb21fe..1ab419b94a9c 100644 --- a/processor/resourceprocessor/factory.go +++ b/processor/resourceprocessor/factory.go @@ -28,7 +28,7 @@ func NewFactory() processor.Factory { processorprofiles.WithTraces(createTracesProcessor, metadata.TracesStability), processorprofiles.WithMetrics(createMetricsProcessor, metadata.MetricsStability), processorprofiles.WithLogs(createLogsProcessor, metadata.LogsStability), - processorprofiles.WithProfiles(createProfilesProcessor, metadata.LogsStability), + processorprofiles.WithProfiles(createProfilesProcessor, metadata.ProfilesStability), ) } From 459ddc2b957bf77d5f45af1f50370b2ed4309d8f Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Tue, 19 Nov 2024 15:16:49 +0100 Subject: [PATCH 08/19] adapt to changes in main Signed-off-by: Florian Bacher --- processor/resourceprocessor/go.mod | 3 --- processor/resourceprocessor/go.sum | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index 32846be0a50d..8f1a2ff5db3f 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -44,11 +44,8 @@ require ( go.opentelemetry.io/collector/client v1.20.0 // indirect go.opentelemetry.io/collector/component/componentstatus v0.114.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.114.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.114.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.114.0 // indirect go.opentelemetry.io/collector/pdata/testdata v0.114.0 // indirect go.opentelemetry.io/collector/pipeline v0.114.0 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.114.0 // indirect go.opentelemetry.io/otel v1.32.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect go.opentelemetry.io/otel/sdk v1.32.0 // indirect diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index f7aaca7d9e50..dc7509a63b86 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -78,6 +78,8 @@ go.opentelemetry.io/collector/pipeline v0.114.0 h1:v3YOhc5z0tD6QbO5n/pnftpIeroih go.opentelemetry.io/collector/pipeline v0.114.0/go.mod h1:4vOvjVsoYTHVGTbfFwqfnQOSV2K3RKUHofh3jNRc2Mg= go.opentelemetry.io/collector/processor v0.114.0 h1:6bqQgLL7BtKrNv4YkEOGjZfkcfZv/ciJSQx1epGG9Zk= go.opentelemetry.io/collector/processor v0.114.0/go.mod h1:DV/wa+nAmSHIDeD9NblPwkY9PbgtDQAZJ+PE5biZwPc= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.114.0 h1:/CQJ0UQRStwBQnM4Z9lTr6D4IqEKH1iuUWVr21fP4To= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.114.0/go.mod h1:HD2uDr7TIWQ+TsXBLmrHu396EeClj7YNoNzoWJw4jrY= go.opentelemetry.io/collector/processor/processorprofiles v0.114.0 h1:+P/1nLouEXTnN8DVQl+qWwO4BTkQyNPG9t/FrpUqrSI= go.opentelemetry.io/collector/processor/processorprofiles v0.114.0/go.mod h1:3fuHeNIpINwx3bqFMprmDJyr6y5tWoWbJH599kltO5Y= go.opentelemetry.io/collector/processor/processortest v0.114.0 h1:3FTaVXAp0LoVmUJn1ewBFckAby7AHa6/Kcdj0xuW14c= From ec0696d1b5100d801773651b91198e265dad939b Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Fri, 6 Dec 2024 07:30:13 +0100 Subject: [PATCH 09/19] fix merge conflicts Signed-off-by: Florian Bacher --- processor/resourceprocessor/go.mod | 5 +---- processor/resourceprocessor/go.sum | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index 8ad7eb830a26..83844a9c4a21 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -9,7 +9,7 @@ require ( go.opentelemetry.io/collector/component v0.115.0 go.opentelemetry.io/collector/component/componenttest v0.115.0 go.opentelemetry.io/collector/confmap v1.21.0 - go.opentelemetry.io/collector/consumer v0.115.0 + go.opentelemetry.io/collector/consumer v1.21.0 go.opentelemetry.io/collector/consumer/consumerprofiles v0.115.0 go.opentelemetry.io/collector/consumer/consumertest v0.115.0 go.opentelemetry.io/collector/pdata v1.21.0 @@ -44,11 +44,8 @@ require ( go.opentelemetry.io/collector/client v1.21.0 // indirect go.opentelemetry.io/collector/component/componentstatus v0.115.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.115.0 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.115.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.115.0 // indirect go.opentelemetry.io/collector/pdata/testdata v0.115.0 // indirect go.opentelemetry.io/collector/pipeline v0.115.0 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.115.0 // indirect go.opentelemetry.io/otel v1.32.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect go.opentelemetry.io/otel/sdk v1.32.0 // indirect diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index 575e0c23f543..add26aac079d 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -78,6 +78,8 @@ go.opentelemetry.io/collector/pipeline v0.115.0 h1:bmACBqb0e8U9ag+vGGHUP7kCfAO7H go.opentelemetry.io/collector/pipeline v0.115.0/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= go.opentelemetry.io/collector/processor v0.115.0 h1:+fveHGRe24PZPv/F5taahGuZ9HdNW44hgNWEJhIUdyc= go.opentelemetry.io/collector/processor v0.115.0/go.mod h1:/oLHBlLsm7tFb7zOIrA5C0j14yBtjXKAgxJJ2Bktyk4= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.115.0 h1:r1UF8LPICTRXBL0685zV/CC8J4sWg/qm1g+sHOYMq2Y= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.115.0/go.mod h1:3erq5umu5a7DKXo4PBm4I5yJjc6r0aJNvBV2nVSPDuE= go.opentelemetry.io/collector/processor/processorprofiles v0.115.0 h1:cCZAs+FXaebZPppqAN3m+X3etoSBL6NvyQo8l0hOZoo= go.opentelemetry.io/collector/processor/processorprofiles v0.115.0/go.mod h1:kMxF0gknlWX4duuAJFi2/HuIRi6C3w95tOenRa0GKOY= go.opentelemetry.io/collector/processor/processortest v0.115.0 h1:j9HEaYFOeOB6VYl9zGhBnhQbTkqGBa2udUvu5NTh6hc= From b21942fcf47b59ceb4f7d83e72bffca93fd9f6cd Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Tue, 10 Dec 2024 07:27:11 +0100 Subject: [PATCH 10/19] fix merge conflicts Signed-off-by: Florian Bacher --- processor/resourceprocessor/go.mod | 5 +---- processor/resourceprocessor/go.sum | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index 3ec981f52055..a0d3417ec898 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -16,7 +16,7 @@ require ( go.opentelemetry.io/collector/pdata/pprofile v0.115.1-0.20241206185113-3f3e208e71b8 go.opentelemetry.io/collector/processor v0.115.1-0.20241206185113-3f3e208e71b8 go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.115.1-0.20241206185113-3f3e208e71b8 - go.opentelemetry.io/collector/processor/processorprofiles v0.115.1-0.20241206185113-3f3e208e71b8 + go.opentelemetry.io/collector/processor/processorprofiles v0.115.1-0.20241206185113-3f3e208e71b8 go.opentelemetry.io/collector/processor/processortest v0.115.1-0.20241206185113-3f3e208e71b8 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 @@ -44,11 +44,8 @@ require ( go.opentelemetry.io/collector/client v1.21.1-0.20241206185113-3f3e208e71b8 // indirect go.opentelemetry.io/collector/component/componentstatus v0.115.1-0.20241206185113-3f3e208e71b8 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.115.1-0.20241206185113-3f3e208e71b8 // indirect - go.opentelemetry.io/collector/consumer/consumerprofiles v0.115.1-0.20241206185113-3f3e208e71b8 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.115.1-0.20241206185113-3f3e208e71b8 // indirect go.opentelemetry.io/collector/pdata/testdata v0.115.1-0.20241206185113-3f3e208e71b8 // indirect go.opentelemetry.io/collector/pipeline v0.115.1-0.20241206185113-3f3e208e71b8 // indirect - go.opentelemetry.io/collector/processor/processorprofiles v0.115.1-0.20241206185113-3f3e208e71b8 // indirect go.opentelemetry.io/otel v1.32.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect go.opentelemetry.io/otel/sdk v1.32.0 // indirect diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index 1070a1e2fbab..b98614b5e3d5 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -78,6 +78,8 @@ go.opentelemetry.io/collector/pipeline v0.115.1-0.20241206185113-3f3e208e71b8 h1 go.opentelemetry.io/collector/pipeline v0.115.1-0.20241206185113-3f3e208e71b8/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= go.opentelemetry.io/collector/processor v0.115.1-0.20241206185113-3f3e208e71b8 h1:33Ja3YRQ9Vo1VW4SfVPLE+LmobDPq6IX+3WRpp5oTnU= go.opentelemetry.io/collector/processor v0.115.1-0.20241206185113-3f3e208e71b8/go.mod h1:/oLHBlLsm7tFb7zOIrA5C0j14yBtjXKAgxJJ2Bktyk4= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.115.1-0.20241206185113-3f3e208e71b8 h1:QrRVIzsuHntuKFNmREChd6ICoNn+7MAmg6D2kHKvwQw= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.115.1-0.20241206185113-3f3e208e71b8/go.mod h1:3erq5umu5a7DKXo4PBm4I5yJjc6r0aJNvBV2nVSPDuE= go.opentelemetry.io/collector/processor/processorprofiles v0.115.1-0.20241206185113-3f3e208e71b8 h1:mHGDW0TNL5iqJY7FzJbnX7wb+XS0oKDlZtTDSsQWbFc= go.opentelemetry.io/collector/processor/processorprofiles v0.115.1-0.20241206185113-3f3e208e71b8/go.mod h1:kMxF0gknlWX4duuAJFi2/HuIRi6C3w95tOenRa0GKOY= go.opentelemetry.io/collector/processor/processortest v0.115.1-0.20241206185113-3f3e208e71b8 h1:93zauxyPnjhPfYt4cBCrPPKf4nAxAELPthWCecGWXAg= From 64d029432d67a6a7b90c6d601ac124792555636c Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Tue, 10 Dec 2024 08:28:37 +0100 Subject: [PATCH 11/19] fix formatting Signed-off-by: Florian Bacher --- processor/resourceprocessor/factory.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/processor/resourceprocessor/factory.go b/processor/resourceprocessor/factory.go index d11a6a5170dc..7af676569cd3 100644 --- a/processor/resourceprocessor/factory.go +++ b/processor/resourceprocessor/factory.go @@ -101,7 +101,8 @@ func createProfilesProcessor( ctx context.Context, set processor.Settings, cfg component.Config, - nextConsumer consumerprofiles.Profiles) (processorprofiles.Profiles, error) { + nextConsumer consumerprofiles.Profiles, +) (processorprofiles.Profiles, error) { attrProc, err := attraction.NewAttrProc(&attraction.Settings{Actions: cfg.(*Config).AttributesActions}) if err != nil { return nil, err From 13ccb389cea6299665d3a236464ffa09803e4e8a Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Thu, 19 Dec 2024 10:19:26 +0100 Subject: [PATCH 12/19] fix merge conflicts Signed-off-by: Florian Bacher --- processor/resourceprocessor/go.mod | 4 ++-- processor/resourceprocessor/go.sum | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index 1c486d42dcd2..b5c419e14b27 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -16,7 +16,7 @@ require ( go.opentelemetry.io/collector/pdata/pprofile v0.116.0 go.opentelemetry.io/collector/processor v0.116.0 go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.116.0 - go.opentelemetry.io/collector/processor/processorprofiles v0.116.0 + go.opentelemetry.io/collector/processor/processorprofiles v0.116.0 go.opentelemetry.io/collector/processor/processortest v0.116.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 @@ -45,9 +45,9 @@ require ( go.opentelemetry.io/collector/component/componentstatus v0.116.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.116.0 // indirect go.opentelemetry.io/collector/consumer/xconsumer v0.116.0 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.116.0 // indirect go.opentelemetry.io/collector/pdata/testdata v0.116.0 // indirect go.opentelemetry.io/collector/pipeline v0.116.0 // indirect + go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.0 // indirect go.opentelemetry.io/collector/processor/xprocessor v0.116.0 // indirect go.opentelemetry.io/otel v1.32.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index d5ad123b237a..eddb505afa9d 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -66,6 +66,8 @@ go.opentelemetry.io/collector/confmap v1.22.0 h1:ZKQzRuj5lKu+seKArAAZ1yPRroDPric go.opentelemetry.io/collector/confmap v1.22.0/go.mod h1:Rrhs+MWoaP6AswZp+ReQ2VO9dfOfcUjdjiSHBsG+nec= go.opentelemetry.io/collector/consumer v1.22.0 h1:QmfnNizyNZFt0uK3GG/EoT5h6PvZJ0dgVTc5hFEc1l0= go.opentelemetry.io/collector/consumer v1.22.0/go.mod h1:tiz2khNceFAPokxxfzAuFfIpShBasMT2AL2Sbc7+m0I= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.116.0 h1:3UR2wcmFd19ip7aW9r3KljCyRBWhFOpdWCYSL5xQXeE= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.116.0/go.mod h1:g34L7TyznLMrZqiCYsv9Q/c462rgcoYGt7JNxubZfN8= go.opentelemetry.io/collector/consumer/consumertest v0.116.0 h1:pIVR7FtQMNAzfxBUSMEIC2dX5Lfo3O9ZBfx+sAwrrrM= go.opentelemetry.io/collector/consumer/consumertest v0.116.0/go.mod h1:cV3cNDiPnls5JdhnOJJFVlclrClg9kPs04cXgYP9Gmk= go.opentelemetry.io/collector/consumer/xconsumer v0.116.0 h1:ZrWvq7HumB0jRYmS2ztZ3hhXRNpUVBWPKMbPhsVGmZM= @@ -80,6 +82,12 @@ go.opentelemetry.io/collector/pipeline v0.116.0 h1:o8eKEuWEszmRpfShy7ElBoQ3Jo6kC go.opentelemetry.io/collector/pipeline v0.116.0/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= go.opentelemetry.io/collector/processor v0.116.0 h1:Kyu4tPzTdWNHtZjcxvI/bGNAgyv8L8Kem2r/Mk4IDAw= go.opentelemetry.io/collector/processor v0.116.0/go.mod h1:+/Ugy48RAxlZEXmN2cw51W8t5wdHS9No+GAoP+moskk= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.116.0 h1:sqhvYwsvtAuLSYU5t7SVyfA00x7aSdJ2n2L/8tnBxWE= +go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.116.0/go.mod h1:ylT9hHFuuaZ3lU/cUVQD2XZXvv5lohL956YSeTKuerg= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.0 h1:1tIEJSN3HeCY602B5h2b1K6ocNn/HMNC2E+u7o3ceZA= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.0/go.mod h1:r8oKp+HrgZDp4L6RiNYoEk3x+LMrt9lEiCW6WiaYuJM= +go.opentelemetry.io/collector/processor/processorprofiles v0.116.0 h1:/o35cUxJq1FUAeOTLYGP5AzAPLpt4qsslKxAOYdCH4Q= +go.opentelemetry.io/collector/processor/processorprofiles v0.116.0/go.mod h1:xtsx6rtGnv/SnzAPRQ6wFmzgl6UYSorr5P8zf32FYYo= go.opentelemetry.io/collector/processor/processortest v0.116.0 h1:+IqNEVEE0E2MsO2g7+Y/9dz35sDuvAXRXrLts9NdXrA= go.opentelemetry.io/collector/processor/processortest v0.116.0/go.mod h1:DLaQDBxzgeeaUO0ULMn/efos9PmHZkmYCHuxwCsiVHI= go.opentelemetry.io/collector/processor/xprocessor v0.116.0 h1:iin/UwuWvSLB7ZNfINFUYbZ5lxIi1NjZ2brkyyFdiRA= From 34485ac9e5041d25fa2ab86b72f3ae8d08b4d2b1 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Thu, 19 Dec 2024 13:59:12 +0100 Subject: [PATCH 13/19] fix linting Signed-off-by: Florian Bacher --- processor/resourceprocessor/factory.go | 25 ++++++++++----------- processor/resourceprocessor/factory_test.go | 3 ++- processor/resourceprocessor/go.mod | 8 +++---- processor/resourceprocessor/go.sum | 4 ---- 4 files changed, 17 insertions(+), 23 deletions(-) diff --git a/processor/resourceprocessor/factory.go b/processor/resourceprocessor/factory.go index 7af676569cd3..903397a260bc 100644 --- a/processor/resourceprocessor/factory.go +++ b/processor/resourceprocessor/factory.go @@ -5,14 +5,13 @@ package resourceprocessor // import "github.com/open-telemetry/opentelemetry-col import ( "context" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/consumer/consumerprofiles" + "go.opentelemetry.io/collector/consumer/xconsumer" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processorhelper" - "go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles" - "go.opentelemetry.io/collector/processor/processorprofiles" + "go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper" + "go.opentelemetry.io/collector/processor/xprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor/internal/metadata" @@ -22,13 +21,13 @@ var processorCapabilities = consumer.Capabilities{MutatesData: true} // NewFactory returns a new factory for the Resource processor. func NewFactory() processor.Factory { - return processorprofiles.NewFactory( + return xprocessor.NewFactory( metadata.Type, createDefaultConfig, - processorprofiles.WithTraces(createTracesProcessor, metadata.TracesStability), - processorprofiles.WithMetrics(createMetricsProcessor, metadata.MetricsStability), - processorprofiles.WithLogs(createLogsProcessor, metadata.LogsStability), - processorprofiles.WithProfiles(createProfilesProcessor, metadata.ProfilesStability), + xprocessor.WithTraces(createTracesProcessor, metadata.TracesStability), + xprocessor.WithMetrics(createMetricsProcessor, metadata.MetricsStability), + xprocessor.WithLogs(createLogsProcessor, metadata.LogsStability), + xprocessor.WithProfiles(createProfilesProcessor, metadata.ProfilesStability), ) } @@ -101,18 +100,18 @@ func createProfilesProcessor( ctx context.Context, set processor.Settings, cfg component.Config, - nextConsumer consumerprofiles.Profiles, -) (processorprofiles.Profiles, error) { + nextConsumer xconsumer.Profiles, +) (xprocessor.Profiles, error) { attrProc, err := attraction.NewAttrProc(&attraction.Settings{Actions: cfg.(*Config).AttributesActions}) if err != nil { return nil, err } proc := resourceProcessor{logger: set.Logger, attrProc: attrProc} - return processorhelperprofiles.NewProfiles( + return xprocessorhelper.NewProfiles( ctx, set, cfg, nextConsumer, proc.processProfiles, - processorhelperprofiles.WithCapabilities(processorCapabilities)) + xprocessorhelper.WithCapabilities(processorCapabilities)) } diff --git a/processor/resourceprocessor/factory_test.go b/processor/resourceprocessor/factory_test.go index dc2cba9aba34..89f444f1f2dc 100644 --- a/processor/resourceprocessor/factory_test.go +++ b/processor/resourceprocessor/factory_test.go @@ -5,6 +5,7 @@ package resourceprocessor import ( "context" + "go.opentelemetry.io/collector/processor/xprocessor" "testing" "github.com/stretchr/testify/assert" @@ -65,6 +66,6 @@ func TestInvalidAttributeActions(t *testing.T) { _, err = factory.CreateLogs(context.Background(), processortest.NewNopSettings(), cfg, nil) assert.Error(t, err) - _, err = factory.(processorprofiles.Factory).CreateProfiles(context.Background(), processortest.NewNopSettings(), cfg, nil) + _, err = factory.(xprocessor.Factory).CreateProfiles(context.Background(), processortest.NewNopSettings(), cfg, nil) assert.Error(t, err) } diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index b5c419e14b27..ef62e4bbb628 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -10,14 +10,15 @@ require ( go.opentelemetry.io/collector/component/componenttest v0.116.0 go.opentelemetry.io/collector/confmap v1.22.0 go.opentelemetry.io/collector/consumer v1.22.0 - go.opentelemetry.io/collector/consumer/consumerprofiles v0.116.0 go.opentelemetry.io/collector/consumer/consumertest v0.116.0 + go.opentelemetry.io/collector/consumer/xconsumer v0.116.0 go.opentelemetry.io/collector/pdata v1.22.0 go.opentelemetry.io/collector/pdata/pprofile v0.116.0 go.opentelemetry.io/collector/processor v0.116.0 - go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.116.0 + go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.0 go.opentelemetry.io/collector/processor/processorprofiles v0.116.0 go.opentelemetry.io/collector/processor/processortest v0.116.0 + go.opentelemetry.io/collector/processor/xprocessor v0.116.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) @@ -44,11 +45,8 @@ require ( go.opentelemetry.io/collector/client v1.22.0 // indirect go.opentelemetry.io/collector/component/componentstatus v0.116.0 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.116.0 // indirect - go.opentelemetry.io/collector/consumer/xconsumer v0.116.0 // indirect go.opentelemetry.io/collector/pdata/testdata v0.116.0 // indirect go.opentelemetry.io/collector/pipeline v0.116.0 // indirect - go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.0 // indirect - go.opentelemetry.io/collector/processor/xprocessor v0.116.0 // indirect go.opentelemetry.io/otel v1.32.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect go.opentelemetry.io/otel/sdk v1.32.0 // indirect diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index eddb505afa9d..5785f868b166 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -66,8 +66,6 @@ go.opentelemetry.io/collector/confmap v1.22.0 h1:ZKQzRuj5lKu+seKArAAZ1yPRroDPric go.opentelemetry.io/collector/confmap v1.22.0/go.mod h1:Rrhs+MWoaP6AswZp+ReQ2VO9dfOfcUjdjiSHBsG+nec= go.opentelemetry.io/collector/consumer v1.22.0 h1:QmfnNizyNZFt0uK3GG/EoT5h6PvZJ0dgVTc5hFEc1l0= go.opentelemetry.io/collector/consumer v1.22.0/go.mod h1:tiz2khNceFAPokxxfzAuFfIpShBasMT2AL2Sbc7+m0I= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.116.0 h1:3UR2wcmFd19ip7aW9r3KljCyRBWhFOpdWCYSL5xQXeE= -go.opentelemetry.io/collector/consumer/consumerprofiles v0.116.0/go.mod h1:g34L7TyznLMrZqiCYsv9Q/c462rgcoYGt7JNxubZfN8= go.opentelemetry.io/collector/consumer/consumertest v0.116.0 h1:pIVR7FtQMNAzfxBUSMEIC2dX5Lfo3O9ZBfx+sAwrrrM= go.opentelemetry.io/collector/consumer/consumertest v0.116.0/go.mod h1:cV3cNDiPnls5JdhnOJJFVlclrClg9kPs04cXgYP9Gmk= go.opentelemetry.io/collector/consumer/xconsumer v0.116.0 h1:ZrWvq7HumB0jRYmS2ztZ3hhXRNpUVBWPKMbPhsVGmZM= @@ -82,8 +80,6 @@ go.opentelemetry.io/collector/pipeline v0.116.0 h1:o8eKEuWEszmRpfShy7ElBoQ3Jo6kC go.opentelemetry.io/collector/pipeline v0.116.0/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= go.opentelemetry.io/collector/processor v0.116.0 h1:Kyu4tPzTdWNHtZjcxvI/bGNAgyv8L8Kem2r/Mk4IDAw= go.opentelemetry.io/collector/processor v0.116.0/go.mod h1:+/Ugy48RAxlZEXmN2cw51W8t5wdHS9No+GAoP+moskk= -go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.116.0 h1:sqhvYwsvtAuLSYU5t7SVyfA00x7aSdJ2n2L/8tnBxWE= -go.opentelemetry.io/collector/processor/processorhelper/processorhelperprofiles v0.116.0/go.mod h1:ylT9hHFuuaZ3lU/cUVQD2XZXvv5lohL956YSeTKuerg= go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.0 h1:1tIEJSN3HeCY602B5h2b1K6ocNn/HMNC2E+u7o3ceZA= go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.0/go.mod h1:r8oKp+HrgZDp4L6RiNYoEk3x+LMrt9lEiCW6WiaYuJM= go.opentelemetry.io/collector/processor/processorprofiles v0.116.0 h1:/o35cUxJq1FUAeOTLYGP5AzAPLpt4qsslKxAOYdCH4Q= From 89ef6f753dd77da6e42a68794beb56c35532fe14 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Thu, 19 Dec 2024 14:15:04 +0100 Subject: [PATCH 14/19] fix linting Signed-off-by: Florian Bacher --- processor/resourceprocessor/factory.go | 1 + processor/resourceprocessor/factory_test.go | 5 ++--- processor/resourceprocessor/resource_processor_test.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/processor/resourceprocessor/factory.go b/processor/resourceprocessor/factory.go index 903397a260bc..d0d6b57f74ee 100644 --- a/processor/resourceprocessor/factory.go +++ b/processor/resourceprocessor/factory.go @@ -5,6 +5,7 @@ package resourceprocessor // import "github.com/open-telemetry/opentelemetry-col import ( "context" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/xconsumer" diff --git a/processor/resourceprocessor/factory_test.go b/processor/resourceprocessor/factory_test.go index 89f444f1f2dc..a4d2f7ab04d2 100644 --- a/processor/resourceprocessor/factory_test.go +++ b/processor/resourceprocessor/factory_test.go @@ -5,14 +5,13 @@ package resourceprocessor import ( "context" - "go.opentelemetry.io/collector/processor/xprocessor" "testing" "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/processor/processorprofiles" "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/collector/processor/xprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction" ) @@ -44,7 +43,7 @@ func TestCreateProcessor(t *testing.T) { assert.NoError(t, err) assert.NotNil(t, lp) - pp, err := factory.(processorprofiles.Factory).CreateProfiles(context.Background(), processortest.NewNopSettings(), cfg, consumertest.NewNop()) + pp, err := factory.(xprocessor.Factory).CreateProfiles(context.Background(), processortest.NewNopSettings(), cfg, consumertest.NewNop()) assert.NoError(t, err) assert.NotNil(t, pp) } diff --git a/processor/resourceprocessor/resource_processor_test.go b/processor/resourceprocessor/resource_processor_test.go index f691d64f7afb..1cd915e34ac7 100644 --- a/processor/resourceprocessor/resource_processor_test.go +++ b/processor/resourceprocessor/resource_processor_test.go @@ -15,8 +15,8 @@ import ( "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/pprofile" "go.opentelemetry.io/collector/pdata/ptrace" - "go.opentelemetry.io/collector/processor/processorprofiles" "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/collector/processor/xprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/attraction" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/testdata" @@ -135,7 +135,7 @@ func TestResourceProcessorAttributesUpsert(t *testing.T) { // Test profiles consumer tpn := new(consumertest.ProfilesSink) - rpp, err := factory.(processorprofiles.Factory).CreateProfiles(context.Background(), processortest.NewNopSettings(), tt.config, tpn) + rpp, err := factory.(xprocessor.Factory).CreateProfiles(context.Background(), processortest.NewNopSettings(), tt.config, tpn) require.NoError(t, err) assert.True(t, rpp.Capabilities().MutatesData) From f4307eaffc8a5dc935c7e1dd67723dd8503c2889 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Tue, 7 Jan 2025 08:24:52 +0100 Subject: [PATCH 15/19] fix merge conflicts Signed-off-by: Florian Bacher --- processor/resourceprocessor/go.mod | 5 ----- processor/resourceprocessor/go.sum | 2 ++ 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index a67682791539..62c6748b5676 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -16,8 +16,6 @@ require ( go.opentelemetry.io/collector/pdata/pprofile v0.116.1-0.20241220212031-7c2639723f67 go.opentelemetry.io/collector/processor v0.116.1-0.20241220212031-7c2639723f67 go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.1-0.20241220212031-7c2639723f67 - go.opentelemetry.io/collector/processor/processorprofiles v0.116.1-0.20241220212031-7c2639723f67 - go.opentelemetry.io/collector/processor v0.116.1-0.20241220212031-7c2639723f67 go.opentelemetry.io/collector/processor/processortest v0.116.1-0.20241220212031-7c2639723f67 go.opentelemetry.io/collector/processor/xprocessor v0.116.1-0.20241220212031-7c2639723f67 go.uber.org/goleak v1.3.0 @@ -46,11 +44,8 @@ require ( go.opentelemetry.io/collector/client v1.22.1-0.20241220212031-7c2639723f67 // indirect go.opentelemetry.io/collector/component/componentstatus v0.116.1-0.20241220212031-7c2639723f67 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.116.1-0.20241220212031-7c2639723f67 // indirect - go.opentelemetry.io/collector/consumer/xconsumer v0.116.1-0.20241220212031-7c2639723f67 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.116.1-0.20241220212031-7c2639723f67 // indirect go.opentelemetry.io/collector/pdata/testdata v0.116.1-0.20241220212031-7c2639723f67 // indirect go.opentelemetry.io/collector/pipeline v0.116.1-0.20241220212031-7c2639723f67 // indirect - go.opentelemetry.io/collector/processor/xprocessor v0.116.1-0.20241220212031-7c2639723f67 // indirect go.opentelemetry.io/otel v1.32.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect go.opentelemetry.io/otel/sdk v1.32.0 // indirect diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index d00a5d822433..94d447830c6b 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -80,6 +80,8 @@ go.opentelemetry.io/collector/pipeline v0.116.1-0.20241220212031-7c2639723f67 h1 go.opentelemetry.io/collector/pipeline v0.116.1-0.20241220212031-7c2639723f67/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= go.opentelemetry.io/collector/processor v0.116.1-0.20241220212031-7c2639723f67 h1:J5pf3qIAE10Bu7mq4NrkiGJnKY9hgp5e1s9zVeEjZM0= go.opentelemetry.io/collector/processor v0.116.1-0.20241220212031-7c2639723f67/go.mod h1:Wo9nLs1fQOusSODCF9XRfquERzUy/9kFOu9o+ZDOezg= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.1-0.20241220212031-7c2639723f67 h1:RBifBhDwaW5re32YleMkCDAJvapt3pJg04EULw7WhlY= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.116.1-0.20241220212031-7c2639723f67/go.mod h1:UGwy3y1zIndKNoGulV4l/nw+g8qdP7d/qcAEYni9S9c= go.opentelemetry.io/collector/processor/processortest v0.116.1-0.20241220212031-7c2639723f67 h1:tTC1Ht4QI6Vads8yrI82KDWji+zXLcLe8kFnZqFNN8Y= go.opentelemetry.io/collector/processor/processortest v0.116.1-0.20241220212031-7c2639723f67/go.mod h1:TGeGnILO0wnaYba+d8fwkEpwhKEqsz2zXP7jD1VyrxA= go.opentelemetry.io/collector/processor/xprocessor v0.116.1-0.20241220212031-7c2639723f67 h1:6vHt2fe+61nTSFDl8W58a06BrzW4i/wW61kHQiLnzC8= From e60f400180c4284cae2c4e2eb24cdf58a6148d6d Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Fri, 17 Jan 2025 08:13:03 +0100 Subject: [PATCH 16/19] merge main Signed-off-by: Florian Bacher --- processor/resourceprocessor/go.mod | 3 --- processor/resourceprocessor/go.sum | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index e74f7e51b362..a2a99869445a 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -44,11 +44,8 @@ require ( go.opentelemetry.io/collector/client v1.23.1-0.20250114172347-71aae791d7f8 // indirect go.opentelemetry.io/collector/component/componentstatus v0.117.1-0.20250114172347-71aae791d7f8 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.117.1-0.20250114172347-71aae791d7f8 // indirect - go.opentelemetry.io/collector/consumer/xconsumer v0.117.1-0.20250114172347-71aae791d7f8 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.117.1-0.20250114172347-71aae791d7f8 // indirect go.opentelemetry.io/collector/pdata/testdata v0.117.1-0.20250114172347-71aae791d7f8 // indirect go.opentelemetry.io/collector/pipeline v0.117.1-0.20250114172347-71aae791d7f8 // indirect - go.opentelemetry.io/collector/processor/xprocessor v0.117.1-0.20250114172347-71aae791d7f8 // indirect go.opentelemetry.io/otel v1.32.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect go.opentelemetry.io/otel/sdk v1.32.0 // indirect diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index b87833248196..954a1b1a152c 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -80,6 +80,8 @@ go.opentelemetry.io/collector/pipeline v0.117.1-0.20250114172347-71aae791d7f8 h1 go.opentelemetry.io/collector/pipeline v0.117.1-0.20250114172347-71aae791d7f8/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= go.opentelemetry.io/collector/processor v0.117.1-0.20250114172347-71aae791d7f8 h1:/A7wQEmCiSeZhEM8cAQZk7Nbe9QqFF7/tU/i8BhMyXk= go.opentelemetry.io/collector/processor v0.117.1-0.20250114172347-71aae791d7f8/go.mod h1:GPbMoI/2QaOF1AEvMUVMqJeajmxMkhFfVsHo2opYjns= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.117.1-0.20250114172347-71aae791d7f8 h1:TyfLjk2WLnyHWtG2JjQ3FjmUiO3e39Zl2ZbAc63Ue4Q= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.117.1-0.20250114172347-71aae791d7f8/go.mod h1:BLhKkQc2CRVZhGtvvlt47eeNnwiPHz2r9GG8820h/F4= go.opentelemetry.io/collector/processor/processortest v0.117.1-0.20250114172347-71aae791d7f8 h1:A67hYeV2UrCVBLVZMmYltRw1yPkUtvJzlTWfpnuTU3s= go.opentelemetry.io/collector/processor/processortest v0.117.1-0.20250114172347-71aae791d7f8/go.mod h1:yuJcMtExWgL4ctRy82bWNoFPk0tx+xu7zLFL4Ml54D8= go.opentelemetry.io/collector/processor/xprocessor v0.117.1-0.20250114172347-71aae791d7f8 h1:QhumRmy8uffBhZGac4Y3VqmjD9Q06TBnQ5ZMlYP9R/Y= From f2519f7010d7dbd064ba505530638b59556b32f4 Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Mon, 20 Jan 2025 13:55:10 +0100 Subject: [PATCH 17/19] fix merge conflicts Signed-off-by: Florian Bacher --- processor/resourceprocessor/go.mod | 3 --- processor/resourceprocessor/go.sum | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index 5bcd6a829312..e339d20ace24 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -44,11 +44,8 @@ require ( go.opentelemetry.io/collector/client v1.23.1-0.20250117002813-e970f8bb1258 // indirect go.opentelemetry.io/collector/component/componentstatus v0.117.1-0.20250117002813-e970f8bb1258 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.117.1-0.20250117002813-e970f8bb1258 // indirect - go.opentelemetry.io/collector/consumer/xconsumer v0.117.1-0.20250117002813-e970f8bb1258 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.117.1-0.20250117002813-e970f8bb1258 // indirect go.opentelemetry.io/collector/pdata/testdata v0.117.1-0.20250117002813-e970f8bb1258 // indirect go.opentelemetry.io/collector/pipeline v0.117.1-0.20250117002813-e970f8bb1258 // indirect - go.opentelemetry.io/collector/processor/xprocessor v0.117.1-0.20250117002813-e970f8bb1258 // indirect go.opentelemetry.io/otel v1.32.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect go.opentelemetry.io/otel/sdk v1.32.0 // indirect diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index 63591c449461..514318cf0751 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -80,6 +80,8 @@ go.opentelemetry.io/collector/pipeline v0.117.1-0.20250117002813-e970f8bb1258 h1 go.opentelemetry.io/collector/pipeline v0.117.1-0.20250117002813-e970f8bb1258/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= go.opentelemetry.io/collector/processor v0.117.1-0.20250117002813-e970f8bb1258 h1:fkMicphhhmLvGwQS0REqYX+xPaaO5po29F3HwLRAC2U= go.opentelemetry.io/collector/processor v0.117.1-0.20250117002813-e970f8bb1258/go.mod h1:GPbMoI/2QaOF1AEvMUVMqJeajmxMkhFfVsHo2opYjns= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.117.1-0.20250117002813-e970f8bb1258 h1:Ybqpn4YsqLAb2GkGTQMjVmnLSCi2DBSO2IxeambAp/g= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.117.1-0.20250117002813-e970f8bb1258/go.mod h1:BLhKkQc2CRVZhGtvvlt47eeNnwiPHz2r9GG8820h/F4= go.opentelemetry.io/collector/processor/processortest v0.117.1-0.20250117002813-e970f8bb1258 h1:ZAA6RK0spuWcRLsstbyP4hk2Z6N9AH4CT65n1WTpWLI= go.opentelemetry.io/collector/processor/processortest v0.117.1-0.20250117002813-e970f8bb1258/go.mod h1:yuJcMtExWgL4ctRy82bWNoFPk0tx+xu7zLFL4Ml54D8= go.opentelemetry.io/collector/processor/xprocessor v0.117.1-0.20250117002813-e970f8bb1258 h1:QQRe2yxTQ9lk9aTQNUIgU9bd5QzHGn6CdEsGyDsmyWU= From d76dea0f0974ced6079d38a9e025ca760cd95eff Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Thu, 23 Jan 2025 11:39:39 +0100 Subject: [PATCH 18/19] fix merge conflicts Signed-off-by: Florian Bacher --- processor/resourceprocessor/go.mod | 3 --- processor/resourceprocessor/go.sum | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index 4ca105daeb81..bcec8cb184e1 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -44,11 +44,8 @@ require ( go.opentelemetry.io/collector/client v1.24.1-0.20250121185328-fbefb22cc2b3 // indirect go.opentelemetry.io/collector/component/componentstatus v0.118.1-0.20250121185328-fbefb22cc2b3 // indirect go.opentelemetry.io/collector/config/configtelemetry v0.118.1-0.20250121185328-fbefb22cc2b3 // indirect - go.opentelemetry.io/collector/consumer/xconsumer v0.118.1-0.20250121185328-fbefb22cc2b3 // indirect - go.opentelemetry.io/collector/pdata/pprofile v0.118.1-0.20250121185328-fbefb22cc2b3 // indirect go.opentelemetry.io/collector/pdata/testdata v0.118.1-0.20250121185328-fbefb22cc2b3 // indirect go.opentelemetry.io/collector/pipeline v0.118.1-0.20250121185328-fbefb22cc2b3 // indirect - go.opentelemetry.io/collector/processor/xprocessor v0.118.1-0.20250121185328-fbefb22cc2b3 // indirect go.opentelemetry.io/otel v1.34.0 // indirect go.opentelemetry.io/otel/metric v1.34.0 // indirect go.opentelemetry.io/otel/sdk v1.34.0 // indirect diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index 1f4efccfe7ae..5e4978c2262b 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -82,6 +82,7 @@ go.opentelemetry.io/collector/pipeline v0.118.1-0.20250121185328-fbefb22cc2b3 h1 go.opentelemetry.io/collector/pipeline v0.118.1-0.20250121185328-fbefb22cc2b3/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= go.opentelemetry.io/collector/processor v0.118.1-0.20250121185328-fbefb22cc2b3 h1:wnZcg7/EbMmnLXeY3cVZqMl2S2TI5tS0e9PXQlkvqgI= go.opentelemetry.io/collector/processor v0.118.1-0.20250121185328-fbefb22cc2b3/go.mod h1:8J99pUrKfp0oHair1PuAy5iXnzhbBFoXOB/KOOZCCX0= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.118.1-0.20250121185328-fbefb22cc2b3/go.mod h1:WbABuKEwhN+RVrTfPVwDt0mFGgHkMpnRN7hYn0EhQdw= go.opentelemetry.io/collector/processor/processortest v0.118.1-0.20250121185328-fbefb22cc2b3 h1:3rdVJHD7UFFFdYTTN410Vd5G65LzTZSGM44oHzZka+g= go.opentelemetry.io/collector/processor/processortest v0.118.1-0.20250121185328-fbefb22cc2b3/go.mod h1:NPidF4tGoxv3R2KizO89/Yetl43fiibQFyEUcBPICrQ= go.opentelemetry.io/collector/processor/xprocessor v0.118.1-0.20250121185328-fbefb22cc2b3 h1:BfFDyPLGOMuYBPCYUUp3I3/6bc5cFWZBkJdaxx3ftoc= From 5165013d6d054e775ef04b3bbc615825a163c85b Mon Sep 17 00:00:00 2001 From: Florian Bacher Date: Thu, 23 Jan 2025 13:46:36 +0100 Subject: [PATCH 19/19] fix dependencies Signed-off-by: Florian Bacher --- processor/resourceprocessor/go.sum | 1 + 1 file changed, 1 insertion(+) diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index 5e4978c2262b..1e8bb13aa0ca 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -82,6 +82,7 @@ go.opentelemetry.io/collector/pipeline v0.118.1-0.20250121185328-fbefb22cc2b3 h1 go.opentelemetry.io/collector/pipeline v0.118.1-0.20250121185328-fbefb22cc2b3/go.mod h1:qE3DmoB05AW0C3lmPvdxZqd/H4po84NPzd5MrqgtL74= go.opentelemetry.io/collector/processor v0.118.1-0.20250121185328-fbefb22cc2b3 h1:wnZcg7/EbMmnLXeY3cVZqMl2S2TI5tS0e9PXQlkvqgI= go.opentelemetry.io/collector/processor v0.118.1-0.20250121185328-fbefb22cc2b3/go.mod h1:8J99pUrKfp0oHair1PuAy5iXnzhbBFoXOB/KOOZCCX0= +go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.118.1-0.20250121185328-fbefb22cc2b3 h1:+tokCHMHqlH4ICXLEsynQnrf/9CR5tDPPpzWoICQEGg= go.opentelemetry.io/collector/processor/processorhelper/xprocessorhelper v0.118.1-0.20250121185328-fbefb22cc2b3/go.mod h1:WbABuKEwhN+RVrTfPVwDt0mFGgHkMpnRN7hYn0EhQdw= go.opentelemetry.io/collector/processor/processortest v0.118.1-0.20250121185328-fbefb22cc2b3 h1:3rdVJHD7UFFFdYTTN410Vd5G65LzTZSGM44oHzZka+g= go.opentelemetry.io/collector/processor/processortest v0.118.1-0.20250121185328-fbefb22cc2b3/go.mod h1:NPidF4tGoxv3R2KizO89/Yetl43fiibQFyEUcBPICrQ=