Skip to content

Commit

Permalink
Remove key_value_parser operator
Browse files Browse the repository at this point in the history
  • Loading branch information
dhurley committed Dec 3, 2024
1 parent 29e07a0 commit ddb02df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions internal/collector/otel_collector_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,14 +492,6 @@ func (oc *Collector) updateTcplogReceivers(nginxConfigContext *model.NginxConfig
"protocol": "rfc3164",
},
},
{
Type: "key_value_parser",
Fields: map[string]string{
"parse_from": "attributes.message",
"parse_to": "body",
"pair_delimiter": "\",\"",
},
},
{
Type: "remove",
Fields: map[string]string{
Expand Down
4 changes: 2 additions & 2 deletions internal/collector/otel_collector_plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ func TestCollector_updateTcplogReceivers(t *testing.T) {
assert.True(tt, tcplogReceiverAdded)
assert.Len(tt, conf.Collector.Receivers.TcplogReceivers, 1)
assert.Equal(tt, "localhost:151", conf.Collector.Receivers.TcplogReceivers[0].ListenAddress)
assert.Len(tt, conf.Collector.Receivers.TcplogReceivers[0].Operators, 5)
assert.Len(tt, conf.Collector.Receivers.TcplogReceivers[0].Operators, 4)
})

// Calling updateTcplogReceivers shouldn't update the TcplogReceivers slice
Expand All @@ -684,7 +684,7 @@ func TestCollector_updateTcplogReceivers(t *testing.T) {
assert.False(t, tcplogReceiverAdded)
assert.Len(t, conf.Collector.Receivers.TcplogReceivers, 1)
assert.Equal(t, "localhost:151", conf.Collector.Receivers.TcplogReceivers[0].ListenAddress)
assert.Len(t, conf.Collector.Receivers.TcplogReceivers[0].Operators, 5)
assert.Len(t, conf.Collector.Receivers.TcplogReceivers[0].Operators, 4)
})
}

Expand Down

0 comments on commit ddb02df

Please sign in to comment.