Skip to content

Commit

Permalink
feat: add alias as a de-duplication ID
Browse files Browse the repository at this point in the history
  • Loading branch information
iamKunalGupta committed Mar 1, 2024
1 parent c103b08 commit a32f990
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flow/shared/telemetry/sns_message_sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package telemetry

import (
"context"
"fmt"
"strings"
"time"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
Expand Down Expand Up @@ -47,6 +49,10 @@ func (s *SNSMessageSenderImpl) SendMessage(ctx context.Context, subject string,
DataType: aws.String("String"),
StringValue: aws.String(attributes.Type),
},
"alias": { // This will act as a de-duplication ID
DataType: aws.String("String"),
StringValue: aws.String(fmt.Sprintf("[%s] - [%s] - [Window: %s]", attributes.DeploymentUID, subject, time.Now().Truncate(30*time.Minute))),

Check failure on line 54 in flow/shared/telemetry/sns_message_sender.go

View workflow job for this annotation

GitHub Actions / lint

line is 155 characters (lll)
},
},
Subject: aws.String(subject[:100]),
TopicArn: aws.String(s.topic),
Expand Down

0 comments on commit a32f990

Please sign in to comment.