Skip to content

Commit b6501d8

Browse files
committed
PR feedback
1 parent 7a78d3b commit b6501d8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

internal/collector/otel_collector_plugin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ func (oc *Collector) updateNginxAppProtectTcplogReceivers(
572572
oc.config.Collector.Receivers.TcplogReceivers = make(map[string]*config.TcplogReceiver)
573573
}
574574

575-
napSysLogServer := oc.findAvailableSyslogServers(ctx, nginxConfigContext.NAPSysLogServer)
575+
napSysLogServer := oc.findAvailableSyslogServer(ctx, nginxConfigContext.NAPSysLogServer)
576576

577577
if napSysLogServer != "" {
578578
if !oc.doesTcplogReceiverAlreadyExist(napSysLogServer) {
@@ -705,7 +705,7 @@ func (oc *Collector) updateResourceAttributes(
705705
return actionUpdated
706706
}
707707

708-
func (oc *Collector) findAvailableSyslogServers(ctx context.Context, napSyslogServer string) string {
708+
func (oc *Collector) findAvailableSyslogServer(ctx context.Context, napSyslogServer string) string {
709709
if oc.previousNAPSysLogServer != "" && oc.previousNAPSysLogServer == napSyslogServer {
710710
return oc.previousNAPSysLogServer
711711
}

internal/collector/otel_collector_plugin_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ func TestCollector_findAvailableSyslogServers(t *testing.T) {
988988
defer ln.Close()
989989
}
990990

991-
actual := collector.findAvailableSyslogServers(ctx, test.syslogServers)
991+
actual := collector.findAvailableSyslogServer(ctx, test.syslogServers)
992992
assert.Equal(tt, test.expectedSyslogServer, actual)
993993
})
994994
}

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ func registerFlags() {
424424
fs.String(
425425
SyslogServerPort,
426426
DefSyslogServerPort,
427-
"The port Agent will start the syslog server for Nginx App Protect Security violations on",
427+
"The port Agent will start the syslog server on for logs collection",
428428
)
429429

430430
registerCommonFlags(fs)

0 commit comments

Comments
 (0)