From 6bf8465d059ed0abd3649670085c7f9cd0a9820a Mon Sep 17 00:00:00 2001 From: Blake Rouse Date: Wed, 30 Nov 2022 10:27:48 -0500 Subject: [PATCH] Use binaryName instead of component ID for data_streams. 8.6 only (#1845) --- pkg/component/runtime/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/component/runtime/command.go b/pkg/component/runtime/command.go index 405a4329db5..bd85cbc52ac 100644 --- a/pkg/component/runtime/command.go +++ b/pkg/component/runtime/command.go @@ -462,7 +462,7 @@ func (c *CommandRuntime) getCommandSpec() *component.CommandSpec { func attachOutErr(comp component.Component, cmdSpec *component.CommandSpec, typeStr string, binaryName string) process.CmdOption { return func(cmd *exec.Cmd) error { - dataset := fmt.Sprintf("elastic_agent.%s", strings.ReplaceAll(strings.ReplaceAll(comp.ID, "-", "_"), "/", "_")) + dataset := fmt.Sprintf("elastic_agent.%s", strings.ReplaceAll(strings.ReplaceAll(binaryName, "-", "_"), "/", "_")) logger := logger.NewWithoutConfig("").With("component", map[string]interface{}{ "id": comp.ID, "type": typeStr,