From 0b6d97cd511bcbef3ff6bb89a55b3b3854394f29 Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Thu, 19 Dec 2024 17:18:45 +0800 Subject: [PATCH] improve: add launched_at to routine.Submit --- internal/utils/routine/pool.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/utils/routine/pool.go b/internal/utils/routine/pool.go index 9bb3ac4..2556d36 100644 --- a/internal/utils/routine/pool.go +++ b/internal/utils/routine/pool.go @@ -5,6 +5,7 @@ import ( "runtime/pprof" "sync" "sync/atomic" + "time" "github.com/getsentry/sentry-go" "github.com/langgenius/dify-plugin-daemon/internal/utils/log" @@ -44,7 +45,9 @@ func Submit(labels map[string]string, f func()) { } p.Submit(func() { - label := []string{} + label := []string{ + "LaunchedAt", time.Now().Format(time.RFC3339), + } if len(labels) > 0 { for k, v := range labels { label = append(label, k, v)