From 27d9746e60e2a42fc1621e47c55591c56f216d7f Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Date: Thu, 29 Aug 2024 16:01:17 -0400 Subject: [PATCH] Do not emit execution id label by default in single binary (#5704) * Do not emit execution id label by default in single binary Signed-off-by: Eduardo Apolinario * Update flytestdlib/contextutils/context.go Co-authored-by: Thomas J. Fan Signed-off-by: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> --------- Signed-off-by: Eduardo Apolinario Signed-off-by: Eduardo Apolinario <653394+eapolinario@users.noreply.github.com> Co-authored-by: Eduardo Apolinario Co-authored-by: Thomas J. Fan --- cmd/single/start.go | 2 +- flytestdlib/contextutils/context.go | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/cmd/single/start.go b/cmd/single/start.go index e60c0e565f..1683fad4e1 100644 --- a/cmd/single/start.go +++ b/cmd/single/start.go @@ -249,6 +249,6 @@ func init() { RootCmd.AddCommand(startCmd) // Set Keys labeled.SetMetricKeys(contextutils.AppNameKey, contextutils.ProjectKey, contextutils.DomainKey, - contextutils.ExecIDKey, contextutils.WorkflowIDKey, contextutils.NodeIDKey, contextutils.TaskIDKey, + contextutils.WorkflowIDKey, contextutils.NodeIDKey, contextutils.TaskIDKey, contextutils.TaskTypeKey, common.RuntimeTypeKey, common.RuntimeVersionKey, storage.FailureTypeLabel) } diff --git a/flytestdlib/contextutils/context.go b/flytestdlib/contextutils/context.go index 080b0a098c..504ce767e9 100644 --- a/flytestdlib/contextutils/context.go +++ b/flytestdlib/contextutils/context.go @@ -12,14 +12,15 @@ import ( type Key string const ( - AppNameKey Key = "app_name" - NamespaceKey Key = "ns" - TaskTypeKey Key = "tasktype" - ProjectKey Key = "project" - DomainKey Key = "domain" - WorkflowIDKey Key = "wf" - NodeIDKey Key = "node" - TaskIDKey Key = "task" + AppNameKey Key = "app_name" + NamespaceKey Key = "ns" + TaskTypeKey Key = "tasktype" + ProjectKey Key = "project" + DomainKey Key = "domain" + WorkflowIDKey Key = "wf" + NodeIDKey Key = "node" + TaskIDKey Key = "task" + // Adding the ExecIDKey label to a metric will cause higher cardinality. Use with caution. ExecIDKey Key = "exec_id" JobIDKey Key = "job_id" PhaseKey Key = "phase"