func GetResources()

in metricsgenreceiver/internal/metricstmpl/metricstmpl.go [75:86]


func GetResources(path string, startTime time.Time, scale int, vars map[string]any, r *rand.Rand) ([]pcommon.Resource, error) {
	startTimeString := startTime.Format(time.RFC3339)
	resources := make([]pcommon.Resource, scale)
	for i := 0; i < scale; i++ {
		resource, err := RenderResource(path, i, startTimeString, vars, r)
		if err != nil {
			return nil, err
		}
		resources[i] = resource
	}
	return resources, nil
}