@@ -62,26 +62,28 @@ func (fp *FilePlugin) Info() *bus.Info {
6262}
6363
6464func (fp * FilePlugin ) Process (ctx context.Context , msg * bus.Message ) {
65+ ctxWithMetadata := fp .config .NewContextWithLabels (ctx )
66+
6567 switch msg .Topic {
6668 case bus .ConnectionResetTopic :
67- fp .handleConnectionReset (ctx , msg )
69+ fp .handleConnectionReset (ctxWithMetadata , msg )
6870 case bus .ConnectionCreatedTopic :
69- slog .DebugContext (ctx , "File plugin received connection created message" )
71+ slog .DebugContext (ctxWithMetadata , "File plugin received connection created message" )
7072 fp .fileManagerService .SetIsConnected (true )
7173 case bus .NginxConfigUpdateTopic :
72- fp .handleNginxConfigUpdate (ctx , msg )
74+ fp .handleNginxConfigUpdate (ctxWithMetadata , msg )
7375 case bus .ConfigUploadRequestTopic :
74- fp .handleConfigUploadRequest (ctx , msg )
76+ fp .handleConfigUploadRequest (ctxWithMetadata , msg )
7577 case bus .ConfigApplyRequestTopic :
76- fp .handleConfigApplyRequest (ctx , msg )
78+ fp .handleConfigApplyRequest (ctxWithMetadata , msg )
7779 case bus .ConfigApplyCompleteTopic :
78- fp .handleConfigApplyComplete (ctx , msg )
80+ fp .handleConfigApplyComplete (ctxWithMetadata , msg )
7981 case bus .ConfigApplySuccessfulTopic :
80- fp .handleConfigApplySuccess (ctx , msg )
82+ fp .handleConfigApplySuccess (ctxWithMetadata , msg )
8183 case bus .ConfigApplyFailedTopic :
82- fp .handleConfigApplyFailedRequest (ctx , msg )
84+ fp .handleConfigApplyFailedRequest (ctxWithMetadata , msg )
8385 default :
84- slog .DebugContext (ctx , "File plugin received unknown topic" , "topic" , msg .Topic )
86+ slog .DebugContext (ctxWithMetadata , "File plugin received unknown topic" , "topic" , msg .Topic )
8587 }
8688}
8789
0 commit comments