Skip to content

Commit

Permalink
Method for creating flattened function tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
purple4reina committed Dec 13, 2024
1 parent bbfbc49 commit 60df1c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/serverless/invocationlifecycle/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (lp *LifecycleProcessor) processTrace(spans []*pb.Span) {
tracerPayload := &pb.TracerPayload{
Chunks: []*pb.TraceChunk{traceChunk},
Tags: map[string]string{
functionTagsKey: strings.Join(lp.ExtraTags.Tags, ","),
functionTagsKey: lp.ExtraTags.FlatTags(),
},
}

Expand Down
7 changes: 7 additions & 0 deletions pkg/serverless/logs/logs_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ type Tags struct {
Tags []string
}

func (t *Tags) FlatTags() string {
if t == nil {
return ""
}
return strings.Join(t.Tags, ",")
}

//nolint:revive // TODO(SERV) Fix revive linter
type LambdaInitMetric struct {
InitDurationTelemetry float64
Expand Down

0 comments on commit 60df1c5

Please sign in to comment.