From 6c66775be468c995fd4d5250ee2539ac57faa6a8 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Thu, 29 Aug 2024 10:47:09 -0400 Subject: [PATCH] Do not emit execution id label by default in single binary Signed-off-by: Eduardo Apolinario --- 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..c3042700bb 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 this label to a metric will cause higher cardinality. Use with caution. ExecIDKey Key = "exec_id" JobIDKey Key = "job_id" PhaseKey Key = "phase"