Skip to content

Commit

Permalink
It runs
Browse files Browse the repository at this point in the history
  • Loading branch information
kgeckhart committed May 11, 2024
1 parent f1cdfff commit 5dbb769
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/job/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ func NewDefaultResourceDecorator(
if len(dimensionRegexps) > 0 && len(resources) > 0 {
associator = maxDimAdapter{wrapped: maxdimassociator.NewAssociator(logger, dimensionRegexps, resources)}
return NewResourceDecorator(next, nil, associator)
} else {
return NewResourceDecorator(next, globalResource, nil)
}

return NewResourceDecorator(next, globalResource, nil)
}

// NewResourceDecorator is an injectable function for testing purposes
Expand All @@ -114,7 +114,7 @@ func (rad *ResourceAssociationDecorator) Append(ctx context.Context, namespace s
return
}

resources := make([]*Resource, 0, len(metrics))
resources := make([]*Resource, len(metrics), len(metrics))
// Slightly modified version of compact to work cleanly with two arrays (both are taken from https://stackoverflow.com/a/20551116)
outputI := 0
for _, metric := range metrics {
Expand Down

0 comments on commit 5dbb769

Please sign in to comment.