In the feature-arch-v2 branch we automatically add a processor to inject the stream ID from the agent policy as event metdata, but we don't check if the stream ID exists before doing this. We should include a check for an empty stream ID before adding the processor.
This is the relevant code in the feature-arch-v2 branch:
|
// source stream |
|
streamID := streamExpected.GetId() |
|
sourceStream := generateAddFieldsProcessor(mapstr.M{"stream_id": streamID}, "@metadata") |
|
processors = append(processors, sourceStream) |
In the feature-arch-v2 branch we automatically add a processor to inject the stream ID from the agent policy as event metdata, but we don't check if the stream ID exists before doing this. We should include a check for an empty stream ID before adding the processor.
This is the relevant code in the feature-arch-v2 branch:
beats/x-pack/libbeat/management/generate.go
Lines 193 to 196 in a528bd2