Skip to content

Agent V2: Check that a stream ID exists before generating an add_fields processor for it #33168

@cmacknz

Description

@cmacknz

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)

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions