@@ -20,16 +20,16 @@ type NestingProcessorConfig struct {
2020 SquashSingleValues bool `mapstructure:"squash_single_values"`
2121}
2222
23- type NestingProcessor struct {
23+ type nestingProcessor struct {
2424 separator string
2525 enabled bool
2626 allowlist []string
2727 denylist []string
2828 squashSingleValues bool
2929}
3030
31- func newNestingProcessor (config * NestingProcessorConfig ) * NestingProcessor {
32- proc := & NestingProcessor {
31+ func newNestingProcessor (config * NestingProcessorConfig ) * nestingProcessor {
32+ proc := & nestingProcessor {
3333 separator : config .Separator ,
3434 enabled : config .Enabled ,
3535 allowlist : config .Include ,
@@ -40,7 +40,7 @@ func newNestingProcessor(config *NestingProcessorConfig) *NestingProcessor {
4040 return proc
4141}
4242
43- func (proc * NestingProcessor ) processLogs (logs plog.Logs ) error {
43+ func (proc * nestingProcessor ) processLogs (logs plog.Logs ) error {
4444 if ! proc .enabled {
4545 return nil
4646 }
@@ -66,7 +66,7 @@ func (proc *NestingProcessor) processLogs(logs plog.Logs) error {
6666 return nil
6767}
6868
69- func (proc * NestingProcessor ) processMetrics (metrics pmetric.Metrics ) error {
69+ func (proc * nestingProcessor ) processMetrics (metrics pmetric.Metrics ) error {
7070 if ! proc .enabled {
7171 return nil
7272 }
@@ -92,7 +92,7 @@ func (proc *NestingProcessor) processMetrics(metrics pmetric.Metrics) error {
9292 return nil
9393}
9494
95- func (proc * NestingProcessor ) processTraces (traces ptrace.Traces ) error {
95+ func (proc * nestingProcessor ) processTraces (traces ptrace.Traces ) error {
9696 if ! proc .enabled {
9797 return nil
9898 }
@@ -118,7 +118,7 @@ func (proc *NestingProcessor) processTraces(traces ptrace.Traces) error {
118118 return nil
119119}
120120
121- func (proc * NestingProcessor ) processAttributes (attributes pcommon.Map ) error {
121+ func (proc * nestingProcessor ) processAttributes (attributes pcommon.Map ) error {
122122 newMap := pcommon .NewMap ()
123123
124124 for k , v := range attributes .All () {
@@ -194,7 +194,7 @@ func (proc *NestingProcessor) processAttributes(attributes pcommon.Map) error {
194194// Checks if given key fulfills the following conditions:
195195// - has a prefix that exists in the allowlist (if it's not empty)
196196// - does not have a prefix that exists in the denylist
197- func (proc * NestingProcessor ) shouldTranslateKey (k string ) bool {
197+ func (proc * nestingProcessor ) shouldTranslateKey (k string ) bool {
198198 if len (proc .allowlist ) > 0 {
199199 isOk := false
200200 for i := 0 ; i < len (proc .allowlist ); i ++ {
@@ -221,7 +221,7 @@ func (proc *NestingProcessor) shouldTranslateKey(k string) bool {
221221
222222// Squashes maps that have single values, eg. map {"a": {"b": {"c": "C", "d": "D"}}}}
223223// gets squashes into {"a.b": {"c": "C", "d": "D"}}}
224- func (proc * NestingProcessor ) squash (attributes pcommon.Map ) pcommon.Map {
224+ func (proc * nestingProcessor ) squash (attributes pcommon.Map ) pcommon.Map {
225225 newMap := pcommon .NewValueMap ()
226226 attributes .CopyTo (newMap .Map ())
227227 key := proc .squashAttribute (newMap )
@@ -242,7 +242,7 @@ func (proc *NestingProcessor) squash(attributes pcommon.Map) pcommon.Map {
242242// and the key gets replaced if needed, "" is returned.
243243//
244244// Else, nothing happens and "" is returned.
245- func (proc * NestingProcessor ) squashAttribute (value pcommon.Value ) string {
245+ func (proc * nestingProcessor ) squashAttribute (value pcommon.Value ) string {
246246 if value .Type () != pcommon .ValueTypeMap {
247247 return ""
248248 }
@@ -279,17 +279,17 @@ func (proc *NestingProcessor) squashAttribute(value pcommon.Value) string {
279279 return ""
280280}
281281
282- func (proc * NestingProcessor ) squashKey (key string , keySuffix string ) string {
282+ func (proc * nestingProcessor ) squashKey (key string , keySuffix string ) string {
283283 if keySuffix == "" {
284284 return key
285285 }
286286 return key + proc .separator + keySuffix
287287}
288288
289- func (proc * NestingProcessor ) isEnabled () bool {
289+ func (proc * nestingProcessor ) isEnabled () bool {
290290 return proc .enabled
291291}
292292
293- func (* NestingProcessor ) ConfigPropertyName () string {
293+ func (* nestingProcessor ) ConfigPropertyName () string {
294294 return "nest_attributes"
295295}
0 commit comments