Skip to content

Commit

Permalink
feat: attach activity info with body
Browse files Browse the repository at this point in the history
  • Loading branch information
iamKunalGupta committed Mar 4, 2024
1 parent 44e92cf commit 0214642
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flow/alerting/alerting.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
"go.temporal.io/sdk/activity"
"log/slog"
"os"
"time"
Expand Down Expand Up @@ -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},
Expand Down

0 comments on commit 0214642

Please sign in to comment.