Repository: open-telemetry/opentelemetry-collector-contrib (2025-08-12T12:20:04Z)

Issue:
`processor/sumologic`: Remove pointers in fields types



Discussion:

Patch:
diff --git a/.chloggen/mx-psi_processor-sumo.yaml b/.chloggen/mx-psi_processor-sumo.yaml
new file mode 100644
index 0000000000000..b1ff385b16c7f
--- /dev/null
+++ b/.chloggen/mx-psi_processor-sumo.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: breaking
+
+# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
+component: sumologicprocessor
+
+# A brief description of the change.  Surround your text with quotes ("") if it needs to start with a backtick (`).
+note: Remove unnecessary pointer for types in configuration struct.
+
+# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
+issues: [41928]
+
+# (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: [api]
diff --git a/processor/sumologicprocessor/config.go b/processor/sumologicprocessor/config.go
index 69226e5a10e46..3028f50b3477e 100644
--- a/processor/sumologicprocessor/config.go
+++ b/processor/sumologicprocessor/config.go
@@ -8,13 +8,13 @@ import (
 )
 
 type Config struct {
-	AddCloudNamespace           bool                      `mapstructure:"add_cloud_namespace"`
-	TranslateAttributes         bool                      `mapstructure:"translate_attributes"`
-	TranslateTelegrafAttributes bool                      `mapstructure:"translate_telegraf_attributes"`
-	NestAttributes              *NestingProcessorConfig   `mapstructure:"nest_attributes"`
-	AggregateAttributes         []aggregationPair         `mapstructure:"aggregate_attributes"`
-	LogFieldsAttributes         *logFieldAttributesConfig `mapstructure:"field_attributes"`
-	TranslateDockerMetrics      bool                      `mapstructure:"translate_docker_metrics"`
+	AddCloudNamespace           bool                     `mapstructure:"add_cloud_namespace"`
+	TranslateAttributes         bool                     `mapstructure:"translate_attributes"`
+	TranslateTelegrafAttributes bool                     `mapstructure:"translate_telegraf_attributes"`
+	NestAttributes              NestingProcessorConfig   `mapstructure:"nest_attributes"`
+	AggregateAttributes         []aggregationPair        `mapstructure:"aggregate_attributes"`
+	LogFieldsAttributes         logFieldAttributesConfig `mapstructure:"field_attributes"`
+	TranslateDockerMetrics      bool                     `mapstructure:"translate_docker_metrics"`
 }
 
 type aggregationPair struct {
@@ -58,7 +58,7 @@ func createDefaultConfig() component.Config {
 		AddCloudNamespace:           defaultAddCloudNamespace,
 		TranslateAttributes:         defaultTranslateAttributes,
 		TranslateTelegrafAttributes: defaultTranslateTelegrafAttributes,
-		NestAttributes: &NestingProcessorConfig{
+		NestAttributes: NestingProcessorConfig{
 			Separator:          defaultNestingSeparator,
 			Enabled:            defaultNestingEnabled,
 			Include:            defaultNestingInclude(),
@@ -66,7 +66,7 @@ func createDefaultConfig() component.Config {
 			SquashSingleValues: defaultNestingSquashSingleValues,
 		},
 		AggregateAttributes: defaultAggregateAttributes(),
-		LogFieldsAttributes: &logFieldAttributesConfig{
+		LogFieldsAttributes: logFieldAttributesConfig{
 			SeverityNumberAttribute: &logFieldAttribute{defaultAddSeverityNumberAttribute, SeverityNumberAttributeName},
 			SeverityTextAttribute:   &logFieldAttribute{defaultAddSeverityTextAttribute, SeverityTextAttributeName},
 			SpanIDAttribute:         &logFieldAttribute{defaultAddSpanIDAttribute, SpanIDAttributeName},
diff --git a/processor/sumologicprocessor/processor.go b/processor/sumologicprocessor/processor.go
index 29ed687e71a00..d949777da757d 100644
--- a/processor/sumologicprocessor/processor.go
+++ b/processor/sumologicprocessor/processor.go
@@ -36,11 +36,11 @@ func newsumologicProcessor(set processor.Settings, config *Config) *sumologicPro
 
 	translateTelegrafMetricsProcessor := newTranslateTelegrafMetricsProcessor(config.TranslateTelegrafAttributes)
 
-	nestingProcessor := newNestingProcessor(config.NestAttributes)
+	nestingProcessor := newNestingProcessor(&config.NestAttributes)
 
 	aggregateAttributesProcessor := newAggregateAttributesProcessor(config.AggregateAttributes)
 
-	logFieldsConversionProcessor := newLogFieldConversionProcessor(config.LogFieldsAttributes)
+	logFieldsConversionProcessor := newLogFieldConversionProcessor(&config.LogFieldsAttributes)
 
 	translateDockerMetricsProcessor := newTranslateDockerMetricsProcessor(config.TranslateDockerMetrics)
 


Test patch:
diff --git a/processor/sumologicprocessor/config_test.go b/processor/sumologicprocessor/config_test.go
index 12d276b0be6a0..b1b641447d172 100644
--- a/processor/sumologicprocessor/config_test.go
+++ b/processor/sumologicprocessor/config_test.go
@@ -39,7 +39,7 @@ func TestLoadConfig(t *testing.T) {
 				AddCloudNamespace:           false,
 				TranslateAttributes:         true,
 				TranslateTelegrafAttributes: true,
-				NestAttributes: &NestingProcessorConfig{
+				NestAttributes: NestingProcessorConfig{
 					Enabled:            false,
 					Separator:          ".",
 					Include:            []string{},
@@ -47,7 +47,7 @@ func TestLoadConfig(t *testing.T) {
 					SquashSingleValues: false,
 				},
 				AggregateAttributes: []aggregationPair{},
-				LogFieldsAttributes: &logFieldAttributesConfig{
+				LogFieldsAttributes: logFieldAttributesConfig{
 					SeverityNumberAttribute: &logFieldAttribute{false, SeverityNumberAttributeName},
 					SeverityTextAttribute:   &logFieldAttribute{false, SeverityTextAttributeName},
 					SpanIDAttribute:         &logFieldAttribute{false, SpanIDAttributeName},
@@ -62,7 +62,7 @@ func TestLoadConfig(t *testing.T) {
 				AddCloudNamespace:           true,
 				TranslateAttributes:         false,
 				TranslateTelegrafAttributes: true,
-				NestAttributes: &NestingProcessorConfig{
+				NestAttributes: NestingProcessorConfig{
 					Enabled:            false,
 					Separator:          ".",
 					Include:            []string{},
@@ -70,7 +70,7 @@ func TestLoadConfig(t *testing.T) {
 					SquashSingleValues: false,
 				},
 				AggregateAttributes: []aggregationPair{},
-				LogFieldsAttributes: &logFieldAttributesConfig{
+				LogFieldsAttributes: logFieldAttributesConfig{
 					SeverityNumberAttribute: &logFieldAttribute{false, SeverityNumberAttributeName},
 					SeverityTextAttribute:   &logFieldAttribute{false, SeverityTextAttributeName},
 					SpanIDAttribute:         &logFieldAttribute{false, SpanIDAttributeName},
@@ -85,7 +85,7 @@ func TestLoadConfig(t *testing.T) {
 				AddCloudNamespace:           true,
 				TranslateAttributes:         true,
 				TranslateTelegrafAttributes: false,
-				NestAttributes: &NestingProcessorConfig{
+				NestAttributes: NestingProcessorConfig{
 					Enabled:            false,
 					Separator:          ".",
 					Include:            []string{},
@@ -93,7 +93,7 @@ func TestLoadConfig(t *testing.T) {
 					SquashSingleValues: false,
 				},
 				AggregateAttributes: []aggregationPair{},
-				LogFieldsAttributes: &logFieldAttributesConfig{
+				LogFieldsAttributes: logFieldAttributesConfig{
 					SeverityNumberAttribute: &logFieldAttribute{false, SeverityNumberAttributeName},
 					SeverityTextAttribute:   &logFieldAttribute{false, SeverityTextAttributeName},
 					SpanIDAttribute:         &logFieldAttribute{false, SpanIDAttributeName},
@@ -108,7 +108,7 @@ func TestLoadConfig(t *testing.T) {
 				AddCloudNamespace:           true,
 				TranslateAttributes:         true,
 				TranslateTelegrafAttributes: true,
-				NestAttributes: &NestingProcessorConfig{
+				NestAttributes: NestingProcessorConfig{
 					Enabled:            true,
 					Separator:          "!",
 					Include:            []string{"blep"},
@@ -116,7 +116,7 @@ func TestLoadConfig(t *testing.T) {
 					SquashSingleValues: true,
 				},
 				AggregateAttributes: []aggregationPair{},
-				LogFieldsAttributes: &logFieldAttributesConfig{
+				LogFieldsAttributes: logFieldAttributesConfig{
 					SeverityNumberAttribute: &logFieldAttribute{false, SeverityNumberAttributeName},
 					SeverityTextAttribute:   &logFieldAttribute{false, SeverityTextAttributeName},
 					SpanIDAttribute:         &logFieldAttribute{false, SpanIDAttributeName},
@@ -131,7 +131,7 @@ func TestLoadConfig(t *testing.T) {
 				AddCloudNamespace:           true,
 				TranslateAttributes:         true,
 				TranslateTelegrafAttributes: true,
-				NestAttributes: &NestingProcessorConfig{
+				NestAttributes: NestingProcessorConfig{
 					Enabled:            false,
 					Separator:          ".",
 					Include:            []string{},
@@ -148,7 +148,7 @@ func TestLoadConfig(t *testing.T) {
 						Prefixes:  []string{"pattern4"},
 					},
 				},
-				LogFieldsAttributes: &logFieldAttributesConfig{
+				LogFieldsAttributes: logFieldAttributesConfig{
 					SeverityNumberAttribute: &logFieldAttribute{false, SeverityNumberAttributeName},
 					SeverityTextAttribute:   &logFieldAttribute{false, SeverityTextAttributeName},
 					SpanIDAttribute:         &logFieldAttribute{false, SpanIDAttributeName},
@@ -163,7 +163,7 @@ func TestLoadConfig(t *testing.T) {
 				AddCloudNamespace:           true,
 				TranslateAttributes:         true,
 				TranslateTelegrafAttributes: true,
-				NestAttributes: &NestingProcessorConfig{
+				NestAttributes: NestingProcessorConfig{
 					Enabled:            false,
 					Separator:          ".",
 					Include:            []string{},
@@ -171,7 +171,7 @@ func TestLoadConfig(t *testing.T) {
 					SquashSingleValues: false,
 				},
 				AggregateAttributes: []aggregationPair{},
-				LogFieldsAttributes: &logFieldAttributesConfig{
+				LogFieldsAttributes: logFieldAttributesConfig{
 					SeverityNumberAttribute: &logFieldAttribute{true, SeverityNumberAttributeName},
 					SeverityTextAttribute:   &logFieldAttribute{false, SeverityTextAttributeName},
 					SpanIDAttribute:         &logFieldAttribute{false, SpanIDAttributeName},
@@ -186,7 +186,7 @@ func TestLoadConfig(t *testing.T) {
 				AddCloudNamespace:           true,
 				TranslateAttributes:         true,
 				TranslateTelegrafAttributes: true,
-				NestAttributes: &NestingProcessorConfig{
+				NestAttributes: NestingProcessorConfig{
 					Enabled:            false,
 					Separator:          ".",
 					Include:            []string{},
@@ -194,7 +194,7 @@ func TestLoadConfig(t *testing.T) {
 					SquashSingleValues: false,
 				},
 				AggregateAttributes: []aggregationPair{},
-				LogFieldsAttributes: &logFieldAttributesConfig{
+				LogFieldsAttributes: logFieldAttributesConfig{
 					SeverityNumberAttribute: &logFieldAttribute{false, SeverityNumberAttributeName},
 					SeverityTextAttribute:   &logFieldAttribute{true, SeverityTextAttributeName},
 					SpanIDAttribute:         &logFieldAttribute{false, SpanIDAttributeName},
@@ -209,7 +209,7 @@ func TestLoadConfig(t *testing.T) {
 				AddCloudNamespace:           true,
 				TranslateAttributes:         true,
 				TranslateTelegrafAttributes: true,
-				NestAttributes: &NestingProcessorConfig{
+				NestAttributes: NestingProcessorConfig{
 					Enabled:            false,
 					Separator:          ".",
 					Include:            []string{},
@@ -217,7 +217,7 @@ func TestLoadConfig(t *testing.T) {
 					SquashSingleValues: false,
 				},
 				AggregateAttributes: []aggregationPair{},
-				LogFieldsAttributes: &logFieldAttributesConfig{
+				LogFieldsAttributes: logFieldAttributesConfig{
 					SeverityNumberAttribute: &logFieldAttribute{false, SeverityNumberAttributeName},
 					SeverityTextAttribute:   &logFieldAttribute{false, SeverityTextAttributeName},
 					SpanIDAttribute:         &logFieldAttribute{true, SpanIDAttributeName},
@@ -232,7 +232,7 @@ func TestLoadConfig(t *testing.T) {
 				AddCloudNamespace:           true,
 				TranslateAttributes:         true,
 				TranslateTelegrafAttributes: true,
-				NestAttributes: &NestingProcessorConfig{
+				NestAttributes: NestingProcessorConfig{
 					Enabled:            false,
 					Separator:          ".",
 					Include:            []string{},
@@ -240,7 +240,7 @@ func TestLoadConfig(t *testing.T) {
 					SquashSingleValues: false,
 				},
 				AggregateAttributes: []aggregationPair{},
-				LogFieldsAttributes: &logFieldAttributesConfig{
+				LogFieldsAttributes: logFieldAttributesConfig{
 					SeverityNumberAttribute: &logFieldAttribute{false, SeverityNumberAttributeName},
 					SeverityTextAttribute:   &logFieldAttribute{false, SeverityTextAttributeName},
 					SpanIDAttribute:         &logFieldAttribute{false, SpanIDAttributeName},
@@ -255,7 +255,7 @@ func TestLoadConfig(t *testing.T) {
 				AddCloudNamespace:           true,
 				TranslateAttributes:         true,
 				TranslateTelegrafAttributes: true,
-				NestAttributes: &NestingProcessorConfig{
+				NestAttributes: NestingProcessorConfig{
 					Enabled:            false,
 					Separator:          ".",
 					Include:            []string{},
@@ -263,7 +263,7 @@ func TestLoadConfig(t *testing.T) {
 					SquashSingleValues: false,
 				},
 				AggregateAttributes: []aggregationPair{},
-				LogFieldsAttributes: &logFieldAttributesConfig{
+				LogFieldsAttributes: logFieldAttributesConfig{
 					SeverityNumberAttribute: &logFieldAttribute{false, SeverityNumberAttributeName},
 					SeverityTextAttribute:   &logFieldAttribute{false, SeverityTextAttributeName},
 					SpanIDAttribute:         &logFieldAttribute{false, SpanIDAttributeName},
diff --git a/processor/sumologicprocessor/processor_test.go b/processor/sumologicprocessor/processor_test.go
index 02f31879a84f4..1e445a01e6241 100644
--- a/processor/sumologicprocessor/processor_test.go
+++ b/processor/sumologicprocessor/processor_test.go
@@ -1351,7 +1351,7 @@ func newCloudNamespaceConfig(addCloudNamespace bool) *Config {
 	config.TranslateAttributes = false
 	config.TranslateTelegrafAttributes = false
 	config.TranslateDockerMetrics = false
-	config.NestAttributes = &NestingProcessorConfig{
+	config.NestAttributes = NestingProcessorConfig{
 		Enabled: false,
 	}
 	return config
@@ -1363,7 +1363,7 @@ func newTranslateAttributesConfig(translateAttributes bool) *Config {
 	config.TranslateAttributes = translateAttributes
 	config.TranslateTelegrafAttributes = false
 	config.TranslateDockerMetrics = false
-	config.NestAttributes = &NestingProcessorConfig{
+	config.NestAttributes = NestingProcessorConfig{
 		Enabled: false,
 	}
 	return config
@@ -1375,7 +1375,7 @@ func newTranslateTelegrafAttributesConfig(translateTelegrafAttributes bool) *Con
 	config.TranslateAttributes = false
 	config.TranslateTelegrafAttributes = translateTelegrafAttributes
 	config.TranslateDockerMetrics = false
-	config.NestAttributes = &NestingProcessorConfig{
+	config.NestAttributes = NestingProcessorConfig{
 		Enabled: false,
 	}
 	return config
@@ -1387,7 +1387,7 @@ func newTranslateDockerMetricsConfig(translateDockerMetrics bool) *Config {
 	config.TranslateAttributes = false
 	config.TranslateTelegrafAttributes = false
 	config.TranslateDockerMetrics = translateDockerMetrics
-	config.NestAttributes = &NestingProcessorConfig{
+	config.NestAttributes = NestingProcessorConfig{
 		Enabled: false,
 	}
 	return config
@@ -1399,7 +1399,7 @@ func newNestAttributesConfig(separator string, enabled bool) *Config {
 	config.TranslateAttributes = false
 	config.TranslateTelegrafAttributes = false
 	config.TranslateDockerMetrics = false
-	config.NestAttributes = &NestingProcessorConfig{
+	config.NestAttributes = NestingProcessorConfig{
 		Separator: separator,
 		Enabled:   enabled,
 	}
@@ -1422,10 +1422,10 @@ func newLogFieldsConversionConfig() *Config {
 	config.TranslateAttributes = false
 	config.TranslateTelegrafAttributes = false
 	config.TranslateDockerMetrics = false
-	config.NestAttributes = &NestingProcessorConfig{
+	config.NestAttributes = NestingProcessorConfig{
 		Enabled: false,
 	}
-	config.LogFieldsAttributes = &logFieldAttributesConfig{
+	config.LogFieldsAttributes = logFieldAttributesConfig{
 		&logFieldAttribute{Enabled: true, Name: "definitely_not_default_name"},
 		&logFieldAttribute{Enabled: true, Name: SeverityTextAttributeName},
 		&logFieldAttribute{Enabled: true, Name: SpanIDAttributeName},