[Heartbeat] Fix broken data_stream assignment#27535
[Heartbeat] Fix broken data_stream assignment#27535andrewvc merged 16 commits intoelastic:masterfrom
Conversation
Fixes elastic#27478 This PR fixes the logic behind assigning the data_steam.dataset field. Previously this was static per monitor type, only the index would change, but not the field. This makes the processor more comprehensive handling not just index naming but field generation.
|
Pinging @elastic/uptime (Team:Uptime) |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
| fields := clientCfg.Processing.Fields.Clone() | ||
| fields.Put("event.dataset", dataset) | ||
|
|
||
| if settings.DataStream != nil { |
There was a problem hiding this comment.
Think i added this as a fix for Heartbeat not recognizing the data stream when used inside agent - #26774.
I hope it still works without this change?
There was a problem hiding this comment.
I just moved the logic to the add_data_stream processor. So, it's still running.
| if event.Fields == nil { | ||
| event.Fields = common.MapStr{} | ||
| } | ||
| event.PutValue("data_stream", eventDataStream) |
There was a problem hiding this comment.
Gotcha so we just moved the logic here 👍🏽
|
@Mergifyio update |
|
Command
|
|
This should now fix This is now a breaking change, setting |
|
@Mergifyio update |
|
Command
|
vigneshshanmugam
left a comment
There was a problem hiding this comment.
LGTM with new changes. Much cleaner indeed!
|
@Mergifyio backport 7.x |
|
@Mergifyio backport 7.15 |
This PR fixes the logic behind assigning the data_steam.dataset field. Previously this was static per monitor type, only the index would change, but not the field. This makes the processor more comprehensive handling not just index naming but field generation. This is a breaking change, setting event.dataset consistently to the monitor type rather than the old value of uptime. Since this field is unlikely to have been used by anyone the impact is low, and it will bring us inline with the ECS spec requiring this field to match event.dataset. (cherry picked from commit 12df9f7)
|
Command
|
This PR fixes the logic behind assigning the data_steam.dataset field. Previously this was static per monitor type, only the index would change, but not the field. This makes the processor more comprehensive handling not just index naming but field generation. This is a breaking change, setting event.dataset consistently to the monitor type rather than the old value of uptime. Since this field is unlikely to have been used by anyone the impact is low, and it will bring us inline with the ECS spec requiring this field to match event.dataset. (cherry picked from commit 12df9f7)
|
Command
|
This PR fixes the logic behind assigning the data_steam.dataset field. Previously this was static per monitor type, only the index would change, but not the field. This makes the processor more comprehensive handling not just index naming but field generation. This is a breaking change, setting event.dataset consistently to the monitor type rather than the old value of uptime. Since this field is unlikely to have been used by anyone the impact is low, and it will bring us inline with the ECS spec requiring this field to match event.dataset. (cherry picked from commit 12df9f7) Co-authored-by: Andrew Cholakian <andrew@andrewvc.com>
This PR fixes the logic behind assigning the data_steam.dataset field. Previously this was static per monitor type, only the index would change, but not the field. This makes the processor more comprehensive handling not just index naming but field generation. This is a breaking change, setting event.dataset consistently to the monitor type rather than the old value of uptime. Since this field is unlikely to have been used by anyone the impact is low, and it will bring us inline with the ECS spec requiring this field to match event.dataset. (cherry picked from commit 12df9f7) Co-authored-by: Andrew Cholakian <andrew@andrewvc.com>
This PR fixes the logic behind assigning the data_steam.dataset field. Previously this was static per monitor type, only the index would change, but not the field. This makes the processor more comprehensive handling not just index naming but field generation. This is a breaking change, setting event.dataset consistently to the monitor type rather than the old value of uptime. Since this field is unlikely to have been used by anyone the impact is low, and it will bring us inline with the ECS spec requiring this field to match event.dataset.


Fixes #27478
This PR fixes the logic behind assigning the data_steam.dataset field.
Previously this was static per monitor type, only the index would change, but not the field. This makes the processor more comprehensive handling not just index naming but field generation.
No release note because it doesn't fix any public bugs.
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.How to test this PR locally