Skip to content

Commit 61a89ba

Browse files
committed
Add a default service_name label for profilecli upload (#2642)
1 parent c57564d commit 61a89ba

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmd/profilecli/upload.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ func upload(ctx context.Context, params *uploadParams) (err error) {
8585
lblBuilder.Set(model.LabelNameProfileName, name)
8686
}
8787

88+
// set a default service_name label if one is not provided
89+
if lbl.Get(model.LabelNameServiceName) == "" {
90+
lblBuilder.Set(model.LabelNameServiceName, "profilecli-upload")
91+
}
92+
8893
series[idx] = &pushv1.RawProfileSeries{
8994
Labels: lblBuilder.Labels(),
9095
Samples: []*pushv1.RawSample{{

0 commit comments

Comments
 (0)