Skip to content

Commit 92868f4

Browse files
sindrerh2ybelMekk
andcommitted
fix: subcommand flags in metric (add make)
Co-authored-by: ybelmekk <[email protected]> Co-authored-by: Carl Hedgren<[email protected]>
1 parent 452638f commit 92868f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/metrics/otel.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func recordCommandUsage(ctx context.Context, provider *metric.MeterProvider, fla
5656
m.WithUnit("1"),
5757
m.WithDescription("Usage frequency of command flags"))
5858

59-
var attributes []attribute.KeyValue
59+
attributes := make([]attribute.KeyValue, len(flags))
6060
for i, f := range flags {
6161
if i == 0 {
6262
attributes[0] = attribute.String("command", f)

0 commit comments

Comments
 (0)