From 0214642bc0ccb8c87d9df058b077f05cc3a2d5d0 Mon Sep 17 00:00:00 2001 From: Kunal Gupta <39487888+iamKunalGupta@users.noreply.github.com> Date: Sat, 2 Mar 2024 01:43:19 +0530 Subject: [PATCH] feat: attach activity info with body --- flow/alerting/alerting.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flow/alerting/alerting.go b/flow/alerting/alerting.go index e69c028a29..463758d8c4 100644 --- a/flow/alerting/alerting.go +++ b/flow/alerting/alerting.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "go.temporal.io/sdk/activity" "log/slog" "os" "time" @@ -211,7 +212,7 @@ func (a *Alerter) checkAndAddAlertToCatalog(ctx context.Context, alertKey string func (a *Alerter) sendTelemetryMessage(ctx context.Context, flowName string, more string, level telemetry.Level) { if a.telemetrySender != nil { details := fmt.Sprintf("[%s] %s", flowName, more) - _, err := a.telemetrySender.SendMessage(ctx, details, fmt.Sprintf("%s\n%+v", details, ctx), telemetry.Attributes{ + _, err := a.telemetrySender.SendMessage(ctx, details, fmt.Sprintf("%s\n%+v", details, activity.GetInfo(ctx)), telemetry.Attributes{ Level: level, DeploymentUID: peerdbenv.PeerDBDeploymentUID(), Tags: []string{flowName},